Problem
You get an array nums of n unique integers. At first, the items were in ascending order. Then the array had between 1 and n rotations.
One rotation moves the last item of the array to the front. For example, one rotation changes [2, 5, 8, 11] into [11, 2, 5, 8]. After n rotations, the array is in ascending order again.
Return the smallest item in nums. Your solution must run in O(log n) time.
Example 1
- Input:
- nums = [9,12,15,1,4,6]
- Output:
- 1
- Explanation:
- The array
[1, 4, 6, 9, 12, 15]had 3 rotations.
Example 2
- Input:
- nums = [3,8,10,14]
- Output:
- 3
- Explanation:
- The array had 4 rotations, so it is in ascending order again.
Example 3
- Input:
- nums = [-2,-7,-5]
- Output:
- -7
Constraints
- n == nums.length
- 1 <= n <= 5000
- -5000 <= nums[i] <= 5000
- All the integers in nums are unique.
- nums is an ascending array that had 1 to n rotations.
SysRound wrote this statement. A reference solution checks every example.
Related questions
Continue with questions that share topics or the same question type.
- Find Minimum in Rotated Sorted Array II
Coding
- Check if Array Is Sorted and Rotated
Coding
- Find First and Last Position of Element in Sorted Array
Coding · Array · Binary Search
- Find if Array Can Be Sorted
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Meta
Leetcode 153. Find Minimum in Rotated Sorted Array
Reported Mar 19, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source