Concepts2
⚙️AlgorithmIntermediate
When to Use Binary Search on Answer
Binary search on answer applies when the feasibility of a candidate value is monotonic: if a value works, then all larger (or smaller) values also work.
#binary search on answer#parametric search#monotone predicate+12
⚙️AlgorithmIntermediate
Binary Search
Binary search quickly finds targets or boundaries in sorted or monotonic data by halving the search interval each step.
#binary search#lower_bound#upper_bound+11