Search⌘ K
AI Features

Find Minimum in Rotated Sorted Array

Explore methods to identify the smallest element in a rotated sorted array by applying an efficient binary search technique. This lesson helps you understand the problem setup, constraints, and an optimal solution that runs in logarithmic time and uses constant space.

Statement

You’re given a rotated sorted array, arr, of length nn, that is rotated clockwise between 11 and nn times.

For example,

  • Before rotation, arr =[1,2,3,4,5,6,7,8]= [1,2,3,4,5,6,7,8]

  • After 33 rotations, the array becomes [6,7,8,1,2,3,4,5][6,7,8,1,2,3,4,5] ...