Skip to main content
PreparationZone Logo
PreparationZone
Back to Coding

Coding · Medium · Pro

Find minimum element in a rotated sorted array (no duplicates)

CodingBinary SearchSenior
Model answerPreview

Approach

  • Compare nums[mid] with nums[hi] to know which half is sorted.
  • If nums[mid] > nums[hi], minimum is in the right half.