ASAPUtils Logo ASAPUtils
Week 4

Find Minimum in Rotated Sorted Array

Find the rotation pivot in logarithmic time by comparing mid with the right boundary, with the invariant, C++ and JavaScript solutions, proof, traps, and an interactive eliminated-range visualizer.

medium Arrays Binary Search O(log n) time · O(1) space Open on LeetCode ↗

The problem

A strictly ascending array of unique values was rotated between one and n times. Return its minimum value in logarithmic time.

nums = [4,5,6,7,0,1,2] -> 0

Related Problems