1. Search the Half That Is Sorted Optimal
Intuition
The rotation point lies in one half, which means the other half is cleanly sorted — and in a sorted half, a simple range check says whether the target is inside. So each step: work out which half is sorted, ask whether the target lives there, and recurse into that half or the other. Ordinary binary search with one extra question.
Algorithm
1. Take the middle; if it is the target, done.
2. If the left half is sorted (left value at most middle value), check whether the target lies within it and move accordingly.
3. Otherwise the right half is sorted; do the same test there.
4. Exhausting the range means the target is absent.
Time & Space
Time O(log n). Space O(1).