Minimum Element in Rotated Array
ARRAY
BINARY SEARCH

Problem

Implement a function to find the minimum element in a sorted array that has been rotated.

The array contains unique elements.

You need to write an algorithm running in O(log n) time.

Examples

minElement([2, 3, 4, 5, 6, 7, 1]) // return 1 // Why? Original array was: [1, 2, 3, 4, 5, 6, 7]
Loading...
Loading...
You don't have access to this question !
Loading...