Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capacity To Ship Packages Within D days #157

Open
Khushipm opened this issue Oct 9, 2021 · 0 comments
Open

Capacity To Ship Packages Within D days #157

Khushipm opened this issue Oct 9, 2021 · 0 comments

Comments

@Khushipm
Copy link

Khushipm commented Oct 9, 2021

A conveyor belt has packages that must be shipped from one port to another within ''days'' days.

The ith package on the conveyor belt has a weight of weights[i]. Each day, we load the ship with packages on the conveyor belt (in the order given by weights). We may not load more weight than the maximum weight capacity of the ship.

Return the least weight capacity of the ship that will result in all the packages on the conveyor belt being shipped within ''days'' days.

A question using Binary search.
Language=Java
Space complexity=O(1)
Time Complexity=O(n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant