Find the least weight capacity of the ship that will result in all packages being shipped within days days.
Example 1
Input: weights = [1,2,3,4,5,6,7,8,9,10], days = 5
Output: 15
Explanation: With capacity 15 the days are [1,2,3,4,5], [6,7], [8], [9], [10], which is exactly 5 days. With capacity 14 the packages would need 6 days, so 15 is the smallest capacity that works.
Example 2
Input: weights = [3,2,2,4,1,4], days = 3
Output: 6
Explanation: With capacity 6 the days are [3,2], [2,4], [1,4]. With capacity 5 you would need 4 days, so 6 is the minimum.
Example 3
Input: weights = [1,2,3,1,1], days = 4
Output: 3
Explanation: The ship must carry at least the heaviest package, 3. With capacity 3 the days are [1,2], [3], [1,1], which is only 3 days, within the limit of 4.
If capacity `C` works, any `C' > C` works too. Binary-search the smallest feasible `C`. The search range is `[max(weights), sum(weights)]` — we need to fit the heaviest package in one trip, and the trivial upper bound is shipping everything in one day.
Run checks all cases above. Submit evaluates all test cases.