Track missing package IDs from out-of-order arrivals

0
Remix

Packages with IDs 1, 2, 3, ... arrive in any order. Support recording an arrival, reporting the contiguous frontier (the largest ID such that every ID up to it has arrived), and listing the IDs still missing.

AmazonTechnical phone screenLast asked Aug 2026
No answer yet. Write the first one; the best answer gets endorsed.