mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-29 17:44:52 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
710 B
710 B
Search in Rotated Sorted Array
A sorted array has been rotated at an unknown index. Find a target value in O(log n). At every step, one of the two halves must be sorted, and you can use that to decide which half to search. This problem teaches you to apply binary search even when the input is not perfectly sorted, by adding a condition to identify the sorted half.
Visit the following resources to learn more: