Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1710. Maximum Units on a Truck
Given box types with counts and units per box and a truck capacity in number of boxes, select up to truckSize boxes to maximize total units. Greedy approach: sort types by units-per-box descending and take as many boxes as possible from the highest-unit types until the truck is full.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.