A conveyor belt carries packages that need to be shipped within days days.
The weight of package weights[i]. Packages must be loaded onto the ship in the exact order given by weights. The combined weight loaded on any single day cannot exceed the maximum capacity of the ship.
Determine the minimum capacity of the ship required to ship all packages within days days.
Constraints:
days weights.length
weights[i]
A conveyor belt carries packages that need to be shipped within days days.
The weight of package weights[i]. Packages must be loaded onto the ship in the exact order given by weights. The combined weight loaded on any single day cannot exceed the maximum capacity of the ship.
Determine the minimum capacity of the ship required to ship all packages within days days.
Constraints:
days weights.length
weights[i]