Problem 3861 · Easy

Minimum Capacity Box

Find the index of the smallest box that still fits the item, taking the lowest index on a tie, or return -1 if no box is large enough.

Open the interactive visualisation