Blind 75 Binary Search Questions
2 problems · Free practice
Binary search needs a reason to discard half of the remaining interval. A rotated sorted array complicates the usual comparison with the target, but at least one half still has useful sorted structure when values are distinct. Keep finding a minimum separate from finding a specified target: their boundary updates serve different goals.
Practice binary search
Find Minimum in Rotated Sorted Array
MediumA nonempty array of distinct integers was sorted ascending, then rotated zero or more positions. Find its minimum in logarithmic time.
Search in Rotated Sorted Array
MediumSearch for a target in a rotated ascending array of distinct integers. Return its index, or −1 if it is absent, using logarithmic time.
What to focus on
- Choose closed or half-open bounds and use them consistently.
- Explain why the answer stays inside the interval after every update.
- Test one element, an unrotated array, and a rotation next to either endpoint.