What LLD interviews actually test, why they're not "code more LeetCode", and the four dimensions you're being scored on the entire 45 minutes.
Picture Sarah at her L5 onsite. After lunch she walks into a room and the interviewer says, "Design a parking lot." Sarah's brain immediately does the wrong thing — it reaches for boxes-and-arrows. "Should I draw a load balancer? Maybe a database?" Twenty minutes in she has a Postgres schema, a sharding strategy, and zero classes. The interviewer politely interrupts: "This is great… but what does the Ticket object look like? What method does the gate call when a car drives in?" Sarah freezes. She designed a system when she was supposed to design objects.
That's the single sentence definition of LLD: it's the design of the objects, not the system. If High-Level Design (HLD) is "what boxes are on the architecture diagram", Low-Level Design is "what classes live inside one of those boxes, what methods they expose, and how they collaborate at runtime." LLD is the moment you stop drawing rectangles for services and start drawing rectangles for classes — with fields above the line and methods below.
If you've never seen an LLD interview before, here's the shape: the prompt is usually a real-world thing with rules — a parking lot, a vending machine, an elevator, a chess game, a movie booking site. Your job over 45–60 minutes is to walk the interviewer from "here's the problem" to "here's the working object model" — naming classes, drawing relationships, choosing design patterns where they fit, and writing enough code (usually one or two key methods) that the interviewer can see how the runtime would actually behave when a user takes an action.
The fastest way to internalize what LLD is is to put it next to what it isn't. Most candidates blur the two and end up doing neither well. Here's the side-by-side a senior engineer carries in their head.
| Dimension | HLD (System Design) | LLD (Object Design) |
|---|---|---|
| Unit of design | Services, databases, queues | Classes, interfaces, methods |
| Vocabulary | Sharding, replication, caching, fan-out | Inheritance, composition, polymorphism, encapsulation |
| Diagram type | Boxes-and-arrows architecture | UML class diagram + sequence diagram |
| Failure mode you fix | "What if traffic 10×?" | "What if we add a new payment method?" |
| Code on the board | Rare — maybe a JSON payload | Mandatory — at least one full class + one driver method |
| Patterns you cite | Distributed: leader election, gossip, MapReduce | GoF: Strategy, Factory, Observer, State, Decorator |
| Trade-offs centred on | Consistency vs availability, latency vs cost | Flexibility vs simplicity, abstraction vs over-engineering |
| Typical prompt | "Design Twitter" | "Design a Parking Lot" |
So why does the industry keep both interviews? Because they test orthogonal skills. HLD tests whether you understand distributed systems — how data moves under load. LLD tests whether you understand object-oriented design — how to model a domain so the code stays maintainable for five years. A great backend engineer needs both: HLD to choose the right architecture, LLD to write the code that runs inside it without becoming an unmaintainable spaghetti pile.
To understand why companies test LLD, watch what happens to a real codebase three years in. Imagine Raj joins a payments startup in year one. The codebase is small — one file called Payment.java with a 300-line method that handles "charge a card". Life is simple. Six months later the company adds Apple Pay. The method becomes 500 lines with a giant if/else. Then UPI. Then crypto. Then a partnership with a buy-now-pay-later provider. By year three, that one method is 4,000 lines, nobody can change it without breaking three other flows, and every new payment method takes three weeks instead of three days.
LLD is the discipline that prevents that file. The same problem — "charge a card" — could have been modelled as a PaymentMethod interface with a Card, ApplePay, UPI, and Crypto implementation. Adding a new method would mean writing one new class, not editing a 4,000-line monster. That difference — open for extension, closed for modification — is the soul of LLD. Interviewers test it because they've all maintained the 4,000-line version, and they don't want to do it again.
public class Payment { public void charge(String type, double amt) { if (type.equals("card")) { // 800 lines of card logic } else if (type.equals("applepay")) { // 600 lines of Apple Pay logic } else if (type.equals("upi")) { // 700 lines of UPI logic } // ...10 more elses } }
interface PaymentMethod { Receipt charge(double amt); } class Card implements PaymentMethod { ... } class ApplePay implements PaymentMethod { ... } class UPI implements PaymentMethod { ... } // Adding crypto = one new file, zero edits class Crypto implements PaymentMethod { ... }
That's the why. Now the rest of this introduction is about the how — what specifically interviewers measure, how the 45-minute conversation flows, and which mental tools (SOLID, GoF patterns, UML) you need to walk in with already loaded.
Just like HLD has four scoring dimensions, so does LLD — but they're different ones. Knowing them tells you where to spend the 45 minutes. Most loops are won or lost on Pillar 2 (modelling) and Pillar 4 (communication), not on whether you remembered all 23 GoF patterns.
Can you turn a vague prompt — "design a parking lot" — into a tight list of features the design must support, plus a list of things you're explicitly punting on? Candidates who skip this step always design the wrong system. The good move sounds like: "Top 3 functional features I'll focus on: (a) park a car, (b) calculate the bill on exit, (c) reserve a spot from an app. Out of scope: payment processing, valet integration, multi-tenant operators. Sound right?"
What it looks like: the candidate produces 5 functional + 3 non-functional requirements in the first 3 minutes, names what's out of scope, and gets explicit interviewer buy-in before drawing anything.
Can you take the vocabulary of the problem (cars, spots, tickets, gates) and translate it into a coherent class model — picking the right entities, the right relationships (composition vs aggregation vs inheritance), and the right level of abstraction? This is the heaviest weight in the rubric. A great class diagram is half the interview.
What it looks like: the candidate names 5–8 entities, explains why each one is its own class (vs a field on another class), and can defend their inheritance vs composition choices with a one-line reason rooted in "what changes independently?"
Can you spot the variation points in the design — the places where future requirements are most likely to demand change — and apply the right GoF pattern there? The senior signal isn't "I memorized 23 patterns"; it's "I picked Strategy here because pricing rules will change every quarter, and I picked State here because the booking goes through 6 distinct lifecycle stages."
What it looks like: 2–4 patterns named, each one tied to a specific class in the design, each one justified by a concrete future-change scenario the interviewer can imagine.
Can you narrate why you're making each choice, respond to interviewer pushback without getting defensive, and articulate the trade-offs of every decision in one sentence? The interviewer is also scoring "would I want this person on my code review?" Candidates who design silently — heads down, drawing for 20 minutes — fail this pillar even when their design is correct.
What it looks like: the candidate thinks aloud, asks "is this the depth you want?" at every milestone, and when challenged with "why composition not inheritance?" answers in one sentence: "A car's engine isn't an 'is-a' — it's a 'has-a'. If we ever need a hybrid (gas + electric), inheritance forces multiple inheritance; composition just adds another field."
An LLD interview isn't a free-form chat — it has phases, and good candidates can feel the phase change without being told. Here's the shape of the conversation, minute by minute. We'll go deeper on each step in the framework page; this is the helicopter view.
Requirements. Functional + non-functional. Top 3 user actions. Explicit out-of-scope list. Get interviewer sign-off.
Core Entities. List 5–8 nouns with one-sentence responsibility each. No fields yet.
Class Diagram. UML with fields, methods, and relationships (inheritance/composition/association).
Patterns + Sequence. Identify variation points, apply 2–4 GoF patterns. Sequence diagram for the primary flow.
Java Code. Enums → interfaces → entity classes → service → main(). One end-to-end happy path that compiles in your head.
Trade-offs & Q&A. Cross-questions on extension points, concurrency, and "what would you change?"
Before you walk into the interview, the five SOLID principles need to be loaded into RAM, not on the disk. They are the vocabulary the interviewer expects you to think in — every design decision you make should map back to one of them. Here they are in plain English, with the one-sentence test that tells you whether you're following them.
Every class has one reason to change. The Invoice class shouldn't know how to print itself; that's the printer's job.
The test: can you describe what the class does in one sentence without using "and"? If not, split it.
Open for extension, closed for modification. Adding a new payment method shouldn't require editing the existing payment processor.
The test: can you add a new variant by writing a new file (not editing an old one)? If not, you're missing an interface.
A subclass must be usable wherever its parent is, without surprises. If Square extends Rectangle and setting width changes height, you've broken Liskov.
The test: can the caller use any subclass without checking instanceof? If they need if (obj instanceof Square), the hierarchy is wrong.
Many small interfaces beat one fat one. Don't force JsonReader to implement writeXml() just because it sits in the same hierarchy.
The test: does any implementation throw UnsupportedOperationException? You've combined unrelated capabilities — split the interface.
Depend on abstractions, not concretions. The OrderService shouldn't new MySQLOrderRepo() — it should accept a OrderRepository interface in its constructor and let the wiring decide which implementation to inject.
The test: can you swap MySQL for an in-memory store in the unit tests without changing OrderService? If yes, you're inverted. If you have to mock the database driver, you're not.
if." That kind of answer — where every design choice is named with a SOLID principle — is what separates a senior signal from a junior one. You're not just building a thing; you're building it according to a stated principle, and you can quote the principle at any moment.LLD prompts cluster into a handful of recognisable shapes. Once you know the shape, you know which patterns to reach for and which traps to avoid. Here's the field guide — keep it loaded in your head before the interview so you can categorise the prompt within ten seconds of hearing it.
| Shape | Examples | Reach For | The Trap |
|---|---|---|---|
| State Machine | Vending Machine, Elevator, ATM, Order/Booking lifecycle | State pattern, enums for events, transition table |
If/else chains in every method instead of one State class per state |
| Resource Allocation | Parking Lot, Hotel, Movie Booking, Library | Strategy for allocation rules, Singleton for the registry, locks on the spot/seat |
Race condition: two users booking the same spot — answer this before being asked |
| Game / Rules Engine | Snake & Ladders, Tic-Tac-Toe, Chess, Poker | Strategy for moves, Observer for game events, Command for undo |
Hard-coding the rules into the Game class instead of Piece subclasses |
| Marketplace / Aggregator | Swiggy, Uber, MakeMyTrip, Splitwise, Stack Overflow | Factory for vendor adapters, Decorator for surge/discount, Observer for notifications |
Forgetting that the matchmaking algorithm is itself a Strategy |
| Pub-Sub / Notification | Notification Service, Logger, Event Bus, Stock-price ticker | Observer, Chain of Responsibility, Strategy per channel |
Synchronous fan-out blocking the producer — must mention async/queue |
| Data Structure as a System | LRU Cache, In-memory File System, URL Shortener (LLD), Rate Limiter | Composite for trees, custom doubly-linked-list-plus-hashmap, concurrency primitives |
Skipping straight to code without naming the responsibilities of each class |
Every interviewer has a mental list of red flags. Most of them aren't about technical knowledge — they're about process and tone. Here are the six that kill more LLD loops than any other.
Candidate hears "design an elevator" and starts writing class Elevator { ... } without naming the requirements, the entities, or the relationships. The result is always the same: 30 minutes in, you realise you needed a Request queue but you've already wired Elevator to take a floor directly, and now you're refactoring on the whiteboard.
Fix: nothing gets written until Step 4. The first four steps are diagrams and lists.
Candidate name-drops "I'll use the Visitor pattern, the Memento pattern, and the Bridge pattern" for a vending machine that needs none of them. The interviewer asks "why Visitor?" and the candidate folds. Naming a pattern you can't justify is worse than not naming one.
Fix: two to four patterns, max. Each one tied to a specific class and a specific reason in one sentence.
Every relationship becomes a class hierarchy. Car extends Vehicle, SUV extends Car, HybridSUV extends SUV. By depth four nothing is overrideable without breaking a sibling. Inheritance is a one-way door — composition is reversible.
Fix: default to composition. Use inheritance only for genuine "is-a" relationships where the subclass adds behaviour, not just fields.
Two users hit "book this seat" at the same millisecond. Both succeed. The interview is over.
Fix: any time you have a shared mutable resource (a parking spot, a movie seat, an inventory count), say out loud — "this needs synchronisation; I'll use a per-row lock / atomic CAS / optimistic concurrency" — even if the interviewer doesn't ask.
Candidate goes head-down for 20 minutes, draws a beautiful UML diagram, then turns around. The interviewer has no idea why any of those choices were made and can't grade the reasoning. It doesn't matter how good the design is — silence fails the communication pillar.
Fix: narrate every decision. "I'm putting Spot behind an interface because the parking lot has bike, car, and truck spots and they have different size constraints."
With 12 minutes for code, the candidate writes 4 minutes of getter/setter boilerplate, leaves no time for the actual logic. The interviewer learns nothing about how you'd implement parkVehicle().
Fix: say "I'll skip getters/setters and Lombok this in production." Use Java records or just write public fields on the whiteboard. Spend the time on the methods that matter.
This page told you what LLD is and why the four pillars matter. The next two pages turn that into a usable playbook: a 5-step framework you can run on any prompt, and a pattern catalogue you can pull from when you spot a variation point.