DEV Community

Discussion on: Find the smallest number in a rotated sorted array

Collapse
 
theodesp profile image
Theofanis Despoudis

One good insight for similar questions: If the array is sorted, you can find a way to skip elements -> using binary search.

This is similar to the question-> Find peak element in a sorted array -> use Binary search again to find middle element and check middle-1 and middle+1 for peak invariant.