Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1889. Minimum Space Wasted From Packaging
Choose one supplier whose infinite-supply box sizes must each be at least as large as the package they hold, and minimize the total wasted space (sum of box size − package size) for all packages or return -1 if any package is too large. Core challenge: for each supplier decide feasibility and compute minimal waste efficiently by sorting packages and box sizes and using prefix sums + binary searches to group packages into the smallest adequate boxes.
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.