Check whether the first element in the array is greater than the last
element in the array. If it is true, it means the array is rotated after
sorting.
Now, take the middle element of the array and check whether it is greater
than the last element of the array. If true, it means the first half of
u r given a circularly sorted array of n integers ie the array was
1st sorted nd then left or right shifted any no. of times. search for
a given integer k in the array in O(logn) time
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to