Back to problems

Find Minimum in Rotated Sorted Array

Algorithm · Point72 · Medium

Find Minimum in Rotated Sorted Array You receive an integer array nums with length n. It was originally sorted in strictly increasing order, and then it was rotated by some number of positions. For instance, the array [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2] after rotation. Return the smallest element in the rotated array. Your algorithm must run in O(log n) time. Example 1 Example 2 Constraints 1 <= n <= 2 * 10^5 -10^9 <= nums[i] <= 10^9 All elements in nums are…

Checking your access…