Problem 1889 · Hard

Minimum Space Wasted From Packaging

Sort packages, then for each supplier give every package the smallest box that fits it, using prefix sums to total the waste.

Open the interactive visualisation