System design interview question
Design Amazon Locker System
A low-level design for the Amazon Locker system covering the Locker/Cell/Package model with four size categories (S/M/L/XL), a best-fit package assignment algorithm, secure pickup code generation, a cell state machine (EMPTY → RESERVED → OCCUPIED → EXPIRED), and delivery notification flow. Demonstrates Strategy pattern for size fitting, State machine for cell lifecycle, and Factory for code generation.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.