Problem 1705 · Medium

Maximum Number of Eaten Apples

Eat at most one apple per day from batches that expire, maximizing the apples eaten. The visual tracks a heap of batches by expiry date and marks each eaten apple.

Open the interactive visualisation