Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitefbcf8a

Browse files
refactor 1011
1 parenta8ec300 commitefbcf8a

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

‎src/main/java/com/fishercoder/solutions/_1011.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
packagecom.fishercoder.solutions;
22

3-
/**
4-
* 1011. Capacity To Ship Packages Within D Days
5-
*
6-
* A conveyor belt has packages that must be shipped from one port to another within D days.
7-
*
8-
* The i-th package on the conveyor belt has a weight of weights[i].
9-
* Each day, we load the ship with packages on the conveyor belt (in the order given by weights).
10-
* We may not load more weight than the maximum weight capacity of the ship.
11-
*
12-
* Return the least weight capacity of the ship that will result in all the packages on the conveyor belt being shipped within D days.
13-
*
14-
* Note:
15-
* * 1 <= D <= weights.length <= 50000
16-
* * 1 <= weights[i] <= 500
17-
*/
18-
193
publicclass_1011 {
204
publicstaticclassSolution1 {
215
publicintdaysToShip(int[]weights,intcapacity) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp