Search in Rotated Sorted ArrayMedium

array binary search

Find target in an ascending array that was rotated at an unknown pivot, in O(log n). Three approaches, same problem — switch between them and watch how each step halves (or scans) the search space.

Press play to watch the algorithm run.
Metrics
Legend
How it works
0 / 0