Redirected
retagged by
827 views
0 votes
0 votes

retagged by

2 Answers

0 votes
0 votes
Binary search will devide the element into two parts and after that it will go either left or right..but in this question it is divided into 1/3 and 2/3..so after finding middle element we have two choice either to go for 1/3 element or 2/ 3 element.. But in this question worst case is asked so it will go for 2/3 element..so finally

T(n)=T(2n/3)+ c
0 votes
0 votes
Search dividing array into two parts n/3 and 2n/3 out of these it will select one part , where it have to make again search so in worst case recurrence relation will be

T(n)= T(2n/3)+1 or T(n)= T(n/3)+1

so I think answer should be C
Answer:

Related questions

4 votes
4 votes
1 answer
1
0 votes
0 votes
1 answer
3
0 votes
0 votes
2 answers
4