dsa2 min read
Search in Rotated Sorted Array — Half-Sorted Check
Search in a rotated sorted array by identifying which half is sorted and narrowing accordingly.
Read →
webcoderspeed.com
4 articles
Search in a rotated sorted array by identifying which half is sorted and narrowing accordingly.
Find the minimum element in a rotated sorted array by comparing mid with right boundary to locate the rotation point.
Search in a rotated sorted array that may contain duplicates by skipping lo++ when mid equals both boundaries.
Find the minimum in a rotated array with duplicates by shrinking hi-- when nums[mid]==nums[hi].