PROBLEM 15 OF 75

Find Minimum in Rotated Sorted Array

Find the minimum in a rotated sorted array with distinct values.

PATTERNBinary searchDefine which half is impossible before moving a bound.
SPOT THE SIGNAL

Why does this pattern fit?

FRAME · 1 OF 4

Restate the exact job

Find the minimum in a rotated sorted array with distinct values.

WHY THIS FITS

Comparing mid with right reveals whether the rotation pivot is at mid or to its left/right.

COMPLEXITY

O(log n) time · O(1) space

COMMON FAILURE

Using mid − 1 can discard the minimum itself.

THE REASONING, IN ONE PLACE

How to solve Find Minimum in Rotated Sorted Array

The goal is to solve this problem from the pattern, not to memorize a finished answer. Use this as a check after your own attempt.

What the question asks

Find the minimum in a rotated sorted array with distinct values.

Why Binary search fits

Comparing mid with right reveals whether the rotation pivot is at mid or to its left/right.

State to maintain

An inclusive interval containing the minimum.

Transition

If mid > right, move left to mid + 1; otherwise keep mid by moving right to mid.

Time and space

O(log n) time · O(1) space

Counterexample to the tempting mistake

Using mid − 1 can discard the minimum itself.

Prove it again tomorrow

Close this page. Rebuild the state and transition from memory, write a test that exposes the mistake above, then solve a fresh input without looking back. A same-day reread is practice, not proof of retention.

Open blank recall ↗