When the question is “is X possible?” and X is monotonic (more X always works, less X doesn’t), you can binary search the answer. Check the predicate in O(N) and walk the search space in O(log RANGE).
Min max subarray sum <= K: binary search K; check predicate by greedy split.
Min days to ship: binary search days; check “can produce N units per day”.
Capacity to ship packages within D days: binary search the per-day capacity.
lo .. hi
mid = (lo+hi)/2
can_achieve(mid)?
if yes: hi = mid
if no: lo = mid + 1
When the predicate is monotonic, binary-search the answer; O(log range) beats O(N^2).