How to Approach an LLD Interview
Follow a repeatable framework: clarify requirements, identify entities, define relationships and interfaces, pick patterns, and walk through key flows.
Intermediate · about 5 hours · difficulty 3/5
Learn first: Behavioral Patterns
Low-level design (LLD) or object-oriented design rounds ask you to design something like a parking lot or a library system in 45-60 minutes. Interviewers grade structure and reasoning, not how many classes you draw.
A framework that works
- Clarify requirements (5 minutes). Ask about scope: how many floors, what vehicle types, how payment works, whether multiple entry gates exist. Write down functional requirements and a few non-functional ones (thread safety, extensibility).
- Identify core entities: the nouns (ParkingLot, Floor, Spot, Vehicle, Ticket, Payment). Drop ones that are only attributes.
- Define relationships: has-a (composition), is-a (inheritance), uses. Sketch a class diagram with key fields and methods.
- Define interfaces for what varies: pricing, spot allocation and payment are classic Strategy candidates.
- Walk through flows: vehicle enters, gets a spot and ticket, exits and pays. A sequence of method calls shows your design actually works.
- Handle concurrency and edge cases: two cars grabbing the last spot at once, lost tickets, full lot.
- Discuss extensions: electric charging spots, monthly passes. Good designs absorb these by adding classes.
UML you need
Class diagrams (association, aggregation, composition, inheritance, multiplicity) and simple sequence diagrams. Neat boxes and arrows are enough.
Common mistakes
- Jumping into code before agreeing on requirements.
- God classes like
ParkingLotManagerthat do everything. - Enum plus switch everywhere instead of polymorphism.
- Ignoring thread safety when shared resources (spots, seats, inventory) are involved.
Good enough to move on: you can take any unfamiliar prompt and produce a requirement list, class diagram and two walked-through flows in 30 minutes.
Key concepts
- Clarifying requirements
- Identifying entities and responsibilities
- Class diagrams and relationships
- Sequence diagrams for key flows
- Designing for extension
- Concurrency in shared resources
- Common LLD mistakes
Mini project
Pick a prompt you have not seen (for example, a coffee vending machine) and do a timed 45-minute mock alone: write requirements, a class diagram, two sequence flows and three extension scenarios, then compare with a published solution and note what you missed.
Check yourself
In a parking lot design, which parts would you model with the Strategy pattern, and how would that help when a new pricing rule is added?
Free resources
- awesome-low-level-design (case studies) (GitHub)
- Refactoring Guru: Design patterns (Refactoring Guru)
- Grokking the Object Oriented Design Interview notes (GitHub)