When to Use Binary Search

Use binary search on answer when:

1.1. The answer lies in a bounded numeric range

2.2. You can write a feasibility function that returns true/false for a candidate answer

3.3. The feasibility function is monotonic. If answer xx works, then either all y>xy > x work or all y<xy < x work

The pattern: binary search finds the boundary between feasible and infeasible. Your job is identifying what "feasible" means for each problem.