321. Capacity to Ship Packages Within D Days
MediumBinary Search
Find the least weight capacity of the ship that will result in all packages being shipped within days days.
Examples
Input: [1,2,3,4,5,6,7,8,9,10] 5
Output: 15
Explanation: Public test case for Capacity to Ship Packages Within D Days
Constraints
- 1 <= weights.length <= 5*10^4
- 1 <= days <= weights.length
Loading...
Run checks all cases above. Submit evaluates all test cases.