Binary Search on the Answer Game — Parametric Search Challenge
Test feasibility predicate canShip(mid) and halve [lo, hi] to find the minimum valid capacity in O(n log S).
Time Complexity: O(n log S)
Study the algorithm · Watch Visualizer · All Algorithm Games