You are given an array weights[] where weights[i] represents the weight of the ith package, and an integer days representing the number of days within which all packages must be shipped. Packages must be shipped in the given order, and each day you can ship packages whose total weight does not exceed the ship’s capacity. Return the minimum ship capacity required to ship all packages within the given number of days.
Topics
Companies
Articles
Examples:
N/A
Constraints:
1 = weights.length = 5 × 104
1 = weights[i] = 500
1 = days = weights.length
Companies:
AmazonMicrosoftAppleVisa
Topics:
Binary Search
Please log in to access the Submissions tab, where you can review your progress and explore code submissions from other participants.
Please log in to access the Solution tab and view detailed answers and explanations.
Please log in to access the Discussion tab and join conversations with other participants.
Access Restricted: Please Login to access the code editor and test cases.