LeetCode weekly contest 222
RankNameScoreFinish TimeQ1 (3)Q2 (4)Q3 (5)Q4 (6)331 / 9692YoungForest182:02:290:05:320:13:55 20:54:53 21:17:29 5 5641. Maximum Units on a Truck
贪心。按盒子容量从大到小排序后先用大的盒子。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Solution {
public:
int maximumUnits(vector>& boxTypes, int t