LLD prompts
Design these with clean APIs.
Parking lot
Entities, pricing, ticketing, and concurrency edges.
Elevator system
Scheduling, state machines, and test scenarios.
Rate limiter
Token bucket/leaky bucket and thread-safe design.
LRU cache
HashMap + doubly linked list; complexity reasoning.
Checklist
- Start from use cases and invariants.
- Define interfaces first (what changes vs what stays stable).
- Make data ownership explicit (mutability and thread safety).
- Write a few test scenarios to validate behavior.