Concepts5
⚙️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
Fix One Variable Technique
The Fix One Variable technique reduces multi-variable search problems by enumerating one variable explicitly and optimizing over the others with structure.
#fix one variable#dimension reduction#two pointers+12
⚙️AlgorithmAdvanced
Parallel Binary Search
Parallel Binary Search (PBS) lets you binary-search the answers of many queries at once by batching them by their current mid value.
#parallel binary search#offline queries#monotone predicate+10
⚙️AlgorithmIntermediate
Binary Search on Answer
Binary Search on Answer turns an optimization problem into a yes/no decision problem over a monotonic answer space.
#binary search on answer#parametric search#monotonic 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