codingcomplexitysearching
Binary search works on a monotone feasibility check
Anonymous
For a candidate x, write a check that returns true or false. Binary search applies when the result switches at most once across the ordered range, such as false, false, true, true. Find valid bounds first; with n candidates, the search makes O(log n) checks, plus the work inside each check.
0