Packages with the given weights must be loaded onto a boat in the order listed. Each day the boat carries a prefix of what is left, never exceeding its weight capacity. Return the smallest capacity that gets every package shipped within days days.
- This is binary search on the answer: the search space is the range of candidate capacities, not the input array
- The low end is
max(weights) — anything smaller can never carry that one package. The high end is sum(weights) — ship everything in one day - Feasibility is monotone: if a capacity works, every larger capacity works
- Order is fixed; you may not reorder packages