Track the Contiguous Package Frontier and Missing IDs

Quick Overview

Design a PackageTracker that handles out-of-order and duplicate package IDs while maintaining the contiguous delivered frontier from zero. Discuss how to report every missing ID up to the largest observed package, analyze amortized update and output-sensitive reporting costs, and scale the API for extremely sparse ranges.

Track the Contiguous Package Frontier and Missing IDs

Company: Amazon

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Overview: Design a PackageTracker that handles out-of-order and duplicate package IDs while maintaining the contiguous delivered frontier from zero. Discuss how to report every missing ID up to the largest observed package, analyze amortized update and output-sensitive reporting costs, and scale the API for extremely sparse ranges.

|Home/Coding & Algorithms/Amazon
Amazon logo
Amazon
Jul 27, 2026
mediumSoftware EngineerTechnical ScreenCoding & Algorithms
4
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...