Lesson 1 of 12 Foundations

What Is Low-Level Design? HLD vs LLD

What low-level design means, how it differs from high-level design, what LLD interviews test, and a 6-step method to go from requirements to classes.

25-35 min beginner 0/12 lessons done
Course contents Lesson 1 of 12 · 0 done
On this page (8 sections)
  1. What you will learn
  2. LLD in one sentence
  3. What a good LLD shows
  4. A six-step method
  5. How this course is organised
  6. Key takeaways
  7. Exercises
  8. Quiz

What you will learn

  • What low-level design (LLD) is and how it complements high-level design (HLD).
  • What interviewers and code reviewers look for in an LLD.
  • A six-step method from a vague prompt to working classes.
  • How this course is organised.

LLD in one sentence

Low-level design decides the classes, interfaces, relationships and behaviour inside one component so the code is correct, easy to change and easy to test. If HLD is the city map (services, databases, queues), LLD is the floor plan of one building.

High-level design (HLD)Low-level design (LLD)
UnitServices, databases, caches, queuesClasses, interfaces, methods
Main concernsScale, availability, data distributionResponsibilities, extensibility, correctness
OutputArchitecture diagram, data flowClass diagram, key method signatures, code
Typical question”Design WhatsApp""Design a parking lot”, “Design an LRU cache”

HLD is covered in our System Design course. This course is about the inside of the boxes.

What a good LLD shows

  • Clear responsibilities: each class has one job you can describe in a sentence.
  • The right abstractions: interfaces where behaviour varies (pricing, payment, notification), concrete classes where it doesn’t.
  • Extensibility: adding a new vehicle type or discount shouldn’t require editing ten files.
  • Correct state handling: an order can’t be shipped before it’s paid.
  • Concurrency awareness: two people can’t book the same seat.
  • Working code for the core flow, not just boxes.

Common failure modes: one giant “Manager” class doing everything, inheritance hierarchies six levels deep, patterns used for their own sake, and no thought about invalid states.

A six-step method

  1. Clarify requirements. List use cases (park, unpark, pay) and constraints (multiple floors? vehicle sizes?). Agree on scope.
  2. Find the nouns and verbs. Nouns become candidate classes (Vehicle, Spot, Ticket); verbs become methods (park, leave, calculateFee).
  3. Define relationships. Who owns whom (composition), who uses whom (dependency), what’s an “is-a” (inheritance or interface).
  4. Identify what varies. Pricing rules, allocation strategies, payment methods. Put those behind interfaces so new variants plug in.
  5. Model state and rules. Enums or State objects for lifecycles; validation where state changes.
  6. Write the core code and test it. Implement the main flow end to end, then handle edge cases and concurrency.

Every case study in this course follows these steps.

How this course is organised

  • Module 1 (lessons 1–3): OOP essentials, UML-style class diagrams, and the SOLID principles.
  • Module 2 (lessons 4–6): the design patterns that come up most: creational, structural, behavioural.
  • Module 3 (lessons 7–11): case studies: parking lot, elevator, LRU cache, vending machine, movie ticket booking.
  • Module 4 (lesson 12): thread safety and an interview checklist.

Code is in Python (easy to read in any language background), with a Java version where interviews commonly expect it. Every program was run before publishing. For more prompts to practise on, use the LLD practice sheet.

Key takeaways

  • LLD designs the classes and behaviour inside a component; HLD designs the components themselves.
  • Good LLD has single-purpose classes, interfaces where behaviour varies, explicit state rules and concurrency safety.
  • Use the six steps: requirements, nouns/verbs, relationships, variation points, state, code.
  • Patterns are tools to apply where they fit, never goals.

Exercises

  1. For “design a library management system”, list ten nouns and ten verbs from a short requirement description you write yourself.
  2. Name two places in a food-delivery app where behaviour varies and would deserve an interface.
  3. Take a class from a project you’ve written that does too much. List its separate responsibilities.

Quiz

  1. Is “design a URL shortener’s database sharding” an HLD or LLD question?
  2. Which step of the method tells you where to put interfaces?
  3. Name two common LLD mistakes.
Show answers
  1. HLD: it’s about data distribution across machines, not classes.
  2. Step 4, identifying what varies (pricing, strategies, payment methods).
  3. Any two of: a god class doing everything, deep inheritance hierarchies, patterns for their own sake, ignoring invalid states, ignoring concurrency.

Finished this lesson?

Mark it complete to track your progress (saved in this browser).