Sep 12, 2010

logn Search in rotated sorted array

Lets have a sorted array like 1 2 3 4 5 6 7 8 9. Lets rotate it arbitrary number of times. It is like 5 6 7 8 9 1 2 3 4.

Now, can element still be searched in O(lgn) time?

No comments:

Post a Comment