← ALL NOTES
Array

3479. Fruits Into Baskets III

Like version II, but n is large. Each fruit goes into the leftmost basket with capacity ≥ its size. Find the number of unplaced fruits, efficiently.

Loading…