You are given boxTypes where boxTypes[i] = [numberOfBoxes_i, numberOfUnitsPerBox_i] and truckSize (max number of boxes). Choose boxes to maximize total units on the truck.
maxUnits([[1,3],[2,2],[3,1]], 4) => 8
maxUnits([[5,10],[2,5],[4,7],[3,9]], 10) => 91
Waiting for you...
CodeBot will comment on your code as you write...
Click "Run Code" or press Ctrl+Enter to test your solution