in Algorithms edited by
294 views
1 vote
1 vote

 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)

in Algorithms edited by
294 views

Please log in or register to answer this question.

Related questions