← All problems

Find Minimum in Rotated Sorted Array

Medium searchingarrays LeetCode ↗
Find the minimum element in a rotated sorted array in O(log n) time. Think about which half of the array must contain the minimum at each step.

Hints (0/3 revealed)

Log in to reveal hints progressively.

Complexity

Time O(log n), Space O(1)

Common pitfalls

  • Comparing with nums[lo] instead (ambiguous)
  • Missing the duplicate case

Your solution

Log in to save your code and track progress.