Find the index of a target in a rotated sorted array in O(log n) time.
Constraints
Example
>>> search_rotated([4,5,6,7,0,1,2], 0) 4 >>> search_rotated([4,5,6,7,0,1,2], 3) -1 >>> search_rotated([1], 0) -1
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints