Rotated sorted array

An element in a sorted array can be found in O ( log 2 n ) O(\log_2 n) time by using binary search. Now assume you are given a sorted array of n n integers that has been rotated many times. Is it possible to find an element in the array in O ( log 2 n ) O(\log_2 n) time?

Yes Only when he number of rotations is known No Only if the array is sorted in ascending order Only if the array is sorted in decending order

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...