Back to DSA sheet

Find Minimum in Rotated Sorted Array

MediumBinary Search
Open on LeetCodeAmazonGoogleMicrosoft

A sorted array of distinct values was rotated at an unknown pivot. Find the minimum element in O(log n) time.

Constraints
  • 1 <= nums.length <= 5000
  • All values are distinct
  • The array is a rotation of an ascending sorted array
Sheets
Blind 75NeetCode 150NeetCode 250Striver A2Z
find-minimum-in-rotated-sorted-array.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.