[LeetCode] Delivering Boxes from Storage to Ports

1 · · March 19, 2022, 9:59 a.m.
Summary
1687. Delivering Boxes from Storage to Ports You have the task of delivering some boxes from storage to their ports using only one ship. However, this ship has a limit on the number of boxes and the total weight that it can carry. You are given an array boxes, where boxes[i] = [ports​​i​, weighti], and three integers portsCount, maxBoxes, and maxWeight. ports​​i is the port where you need to deliver the ith box and weightsi is the weight of the ith box. portsCount is the number of ports. maxBo...