Karthik Rajan27 days agoMost voted9
Ask two things:
1. If I guess an answer X, can I check if X works in O(n)?
2. If X works, does every bigger X also work (or every smaller)?
If both yes, binary search over X.
Usually the question says something like "minimum possible maximum" or "smallest X such that".
Practise: koko, ship packages, split array largest sum, aggressive cows, book allocation.