Searching a value instead of computing it. Most of competitive programming’s “numerical” work is really searching a monotone or unimodal function, plus knowing when floating point will betray you.
- Binary Search
- Binary Search on the Answer
- Ternary Search
- Two Pointers and Sliding Window
- Newton’s Method
- Golden Section Search
- Coordinate Compression
- Floating Point and Precision
- Numerical Integration (Simpson)
- Big Integer Arithmetic
- Exact Rational Arithmetic
See also: Aliens Trick (binary search on a Lagrange multiplier) · Simulated Annealing