Binary search finds a target in a sorted array by repeatedly halving the search space. Instead of checking every element (), you check only elements.
The core insight: If the array is sorted and your target is greater than the middle element, it must be in the right half. Discard the left half. Repeat.
I'll teach you classic binary search, lower/upper bounds, binary search on the answer (for optimization problems), and binary search on real numbers. You'll also learn the common mistakes that cause infinite loops and off-by-one errors.