Courses › Low-Level Design › Foundations
Introduction
What LLD rounds look like and a 5-step approach that works for every problem.
Low-level design (LLD), also called object-oriented design or machine coding, asks you to design the classes, interfaces and interactions for a self-contained system — a parking lot, an elevator controller, an LRU cache — and often to implement the core of it. Where system design is about services and databases, LLD is about code structure.
What interviewers evaluate
A 5-step approach
- Clarify requirements (5 min). List the core use cases. Ask what's in and out of scope. "Does the parking lot have multiple levels? Multiple entrances? Do we handle payment?"
- Identify entities (5 min). Pull nouns out of the requirements:
ParkingLot,Level,Spot,Vehicle,Ticket. Decide which are classes, which are enums, and which are just fields. - Define relationships and responsibilities (5–10 min). Who owns whom (composition)? Which behavior lives where? Sketch a quick class diagram or list classes with key methods.
- Find the variation points (5 min). Where will requirements change? Spot allocation strategy? Pricing? Put those behind interfaces — usually the Strategy pattern.
- Implement the core flows (15–20 min). Code the main use case end to end. Then walk through an example and discuss extensions, edge cases and concurrency.
[!INTERVIEW] Code the happy path first A clean, working core flow beats a sprawling class hierarchy with nothing implemented. Mention extensions verbally ("pricing is a strategy, so adding weekend rates is a new class") rather than building them all.
Common mistakes
- Starting with inheritance hierarchies — deep trees of
Vehicle → Car → ElectricCar → …are brittle. Prefer composition and small interfaces. - God classes — one
ParkingLotManagerthat does everything. - Anemic models — classes that are only data, with all logic in a single service.
- Over-engineering — every pattern you know, applied whether needed or not.
- Ignoring concurrency — two cars assigned the same spot.
What's in this track
Foundations
- OOP & SOLID — the principles behind good class design
- Design Patterns — the handful that actually show up
- Class Modeling — from a vague prompt to entities, relationships and enums
- Concurrency & Thread Safety — the follow-up almost every round ends with
- The Machine-Coding Round — runnable code under time pressure
- Handling Extension Follow-Ups — where "now add X" changes plug in
Walkthroughs, grouped by what they teach
- Core classics: Design a Parking Lot · Design an LRU Cache · Design an Elevator System
- State machines: Design a Vending Machine · Design an ATM & Digital Wallet · Design a Circuit Breaker
- Reservations and lending: Design a Library & Car Rental System
- Games: Tic-Tac-Toe and the board-game family
- Command & Composite: Design a Text Editor (Undo/Redo) · Design an In-Memory File System · Design a Spreadsheet
- Strategy & rules: Design Splitwise · Design a Discount Engine · Design Ride-Hailing Matching
- Concurrency-heavy: Implement a Rate Limiter Class · Design Movie Ticket Booking · Design an In-Memory Pub/Sub Broker · Design a Task Scheduler
- Infrastructure components: Design a Logging Framework · Design a Notification Service · Design an HTTP Router
- Data structures: Design a Stock Order Book