Cloze

Binary searchMedium

Search in Rotated Sorted Array

nums is a sorted list of different numbers that was rotated some number of places. Return the index of target, or -1 if it is not there, in O(log n).

Aim for O(log n) time, O(1) spaceInspired by a classic interview problem ↗