Binary Search
A divide-and-conquer technique used to efficiently search in sorted data and optimize answers over a range.
Course-level introduction. Renders above the chapter list.
Classic binary search on sorted arrays to find elements efficiently in logarithmic time.
Apply binary search on rotated sorted arrays by identifying sorted halves.
Use binary search on the answer space to optimize problems with monotonic conditions.
Combines binary search with dynamic programming for problems like LIS in O(n log n).