Why Practice LLD?
System design gets you the job, but LLD determines your level. Senior and Staff roles require you to prove you can write production-ready, extensible code under pressure.
Top 10 LLD Interview Questions
| Problem | Core Pattern | Key Challenge |
|---|---|---|
| Parking Lot | Singleton / Strategy | Thread-safety & Pricing |
| Movie Booking | State / Optimistic Lock | Concurrent seat selection |
| Vending Machine | State Machine | Inventory & Payment flow |
| ATM Machine | State / Chain of Resp. | Cash dispensing logic |
| Chess / Tic-Tac-Toe | Strategy / Command | Rule validation |
| Snake & Ladder | Observer / Strategy | Random movement & Events |
| Logging Library | Chain of Responsibility | Severity levels (Info/Error) |
| Elevator System | Request Queue / Dispatch | Multi-elevator optimization |
| Library Management | Composite / Proxy | Search and fine calculation |
| Splitwise | Strategy / Rounding | Simplifying complex debts |
Reflection Checklist
After every LLD practice session, ask:
- OCP Check: If I add a new requirement, do I need to change existing classes?
- SRP Check: Do my classes have more than 3 responsibilities?
- DIP Check: Am I depending on interfaces or concrete implementations?
Final Tip
Don't write 500 lines of code. Write the Skeleton (Interfaces and main logic) first to show the structure. 埋