|
1 | 1 | packagecom.fishercoder.solutions;
|
2 | 2 |
|
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 |
| - |
19 | 3 | publicclass_1011 {
|
20 | 4 | publicstaticclassSolution1 {
|
21 | 5 | publicintdaysToShip(int[]weights,intcapacity) {
|
|