edited by
387 views
1 votes
1 votes

 A sorted array of n elements which has been circularly shifted. For example, {18,25,1,5,11,16} is a sorted array that has been circularly shifted by 2 positions. suppose a person has to find the largest element in a circularly shifted array. Here, there is a small constraint that the number of positions through which it has been shifted is unknown. find time complexity.  

1.

O(nlogn)

 

2.

O(n)

 

3.

O(n^2)

 

4. 

O(logn)

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
1 answer
4