Guide contents

Lesson 31 of 31

LLD Study Plan: A 4-Week Path Through the Course

Low-level design is a skill built by repetition, not by reading. This plan orders the whole course into four weeks, with about an hour per weekday and a longer session at the weekend. Adjust the pace, but keep the order: each week assumes the previous one. A companion reference for the interview itself is the LLD interview checklist.

How to practice a problem

Reading a solution teaches less than producing one. For every problem below, use this loop:

  1. Read only the requirements section. Close the article.
  2. Set a 45-minute timer. Write requirements, entities and the API on paper, then implement in a scratch file.
  3. Make it compile and run a main method that shows the happy path and one failure.
  4. Open the article and compare. Note which requirement you missed, which type you modeled differently, and which pattern you forced or forgot.
  5. A day later, redo the weakest part from memory.

Track three numbers per problem: did you clarify requirements before designing, did the code compile without a rewrite, and did you state the trade-offs. See the LLD interview framework for the method.

Week 1: foundations and vocabulary

Goal: think in Java types (records, enums, sealed interfaces) before thinking in patterns.

Day Read Do
1 What is low-level design and the LLD interview framework Write the framework's steps from memory
2 Modeling domains in Java Model a library (books, members) with classes, records and enums
3 Class diagrams and relationships Draw a diagram for a parking lot, naming owner and multiplicity
4 SOLID in Java Find one violation in code you wrote, and fix it
5 Encapsulation and invariants Make a Money record with a validating compact constructor
Weekend Errors in domain design Redo Day 2 with domain exceptions or a sealed result type

Checkpoint: you can turn a paragraph of requirements into a diagram and a set of compiling type definitions in 15 minutes.

Week 2: state, object graphs, testing and small problems

Goal: handle behavior that changes over time, and practice on compact problems.

Day Read Do
1 State machines with sealed types Model a traffic light with an enum and a document workflow with a sealed interface
2 Object graphs and references Replace one parent-reference cycle with IDs
3 Testability and dependency injection Add a fake clock to any earlier exercise
4 Design tic-tac-toe Timed attempt, then compare
5 Design vending machine Timed attempt, focus on the state enum
Weekend Design LRU cache Timed attempt; also see LRU cache interview

Checkpoint: you use an enum or sealed interface for every state machine, and you can explain why your design has no unintended reference cycles.

Week 3: domain problems and patterns

Goal: apply patterns only where requirements vary, on realistic multi-entity problems.

Day Read Do
1 Design parking lot Timed attempt, then compare the pricing strategy
2 Design elevator system Timed attempt, focus on state and scheduling
3 Design ATM Timed attempt, focus on state and money
4 Design library management Timed attempt, focus on relationships and rules
5 Design Splitwise Timed attempt, focus on integer cents and rounding
Weekend Design movie ticket booking Timed attempt, focus on seat holds and double booking

Supporting reading: SOLID in Java for the principles behind each pattern choice.

Checkpoint: for each problem you can say, for every pattern you used, which requirement made it necessary.

Week 4: systems, concurrency and mock interviews

Goal: data-structure-heavy and concurrent problems, then full-length practice.

Day Read Do
1 Design KV store with TTL Timed attempt with an injected clock
2 LLD rate limiter Timed attempt; compare with the system-level view in design rate limiter and rate limiting algorithms
3 Thread-safe components Make an earlier solution thread-safe
4 Event bus and observers and blocking queue Implement each from scratch
5 Design logger framework and design task scheduler Timed attempt at one
Weekend Design text editor with undo and redo and design file system Timed attempts, then two full mock interviews on unseen prompts

Checkpoint: given an unfamiliar prompt, you produce requirements, a diagram, compiling core code and two extensions inside 45 minutes.

Problem-to-skill map

Every problem in the course, the patterns it practices, and the Java skills it drills.

Problem Patterns and ideas Java skills practiced
Design LRU cache Cache eviction, O(1) operations HashMap plus a doubly linked list, LinkedHashMap, object references
Design KV store with TTL Expiry, lazy vs active cleanup, injected clock Clock interface, TreeMap ordering, ConcurrentHashMap, striped locks
LLD rate limiter Strategy for algorithm, per-key state interfaces and lambdas, Duration, test clock
Design logger framework Observer-style appenders, filters, levels interfaces, ReentrantLock, BlockingQueue and a background appender thread
Design task scheduler Priority queue, injectable clock, worker pool PriorityQueue with a comparator, Runnable, ExecutorService workers
Design text editor with undo and redo Command, memento sealed interface of records, apply and revert, ArrayDeque stacks
Design file system Composite, path resolution sealed interface for nodes, TreeMap children, domain exceptions
Design parking lot Strategy (pricing, allocation), entities record IDs, enum for vehicle size, money in cents
Design elevator system State machine, scheduling strategy enum states, simulation loop, deterministic ticks
Design vending machine State pattern, inventory enum or sealed states, integer cents, change making
Design ATM State, chain for cash dispensing, security state machine, domain exceptions, private balance
Design library management Entities and relationships, rules, fines IDs instead of references, invariants, domain exceptions
Design tic-tac-toe Board model, win detection, extensibility enums, arrays, configurable board size
Design Splitwise Strategy for split types, debt simplification integer cents, TreeMap, rounding rules
Design movie ticket booking Seat hold, concurrency, entities state per seat, locking inside the service, expiry
Design notification service Strategy per channel, observer, retry interfaces, event bus, templates, see also design notification system

Concept-to-problem map

Use this when you want to drill a single skill instead of following the weeks.

Skill Best problems
State machines vending machine, ATM, elevator
Strategy and pluggable rules parking lot, Splitwise, rate limiter
Command and history text editor
Composite and trees file system
Observer and events notification service, event bus
Data structures and complexity LRU cache, KV store
Concurrency thread-safe components, blocking queue, movie ticket booking
Injected time KV store, rate limiter, elevator
Money in integer cents Splitwise, ATM, vending machine

Daily rhythm

A sixty-minute weekday session works best when split the same way every time.

Minutes Activity Purpose
0-10 Re-read yesterday's notes and rerun yesterday's code Retrieval builds memory better than new reading
10-35 Read the day's article and type out its main example Learn the idiom by writing it
35-55 Do the exercise from the table without looking Convert reading into skill
55-60 Write three lines: what worked, what failed, what to redo Feeds the weekend review

Weekend sessions are ninety minutes: forty-five for the timed problem and forty-five for comparison, notes and a redo of the weak part.

Twenty-minute drills

When you have less time, drill one micro-skill. Each drill maps to an article that shows the answer.

Drill What to produce Article
Record and validating constructor Money and UserId records with compact constructors encapsulation and invariants
Enum versus interface Decide for five nouns and justify each in one sentence modeling domains in Java
Domain errors List the failure rules of a booking system as exception classes or sealed result variants errors in domain design
State transitions A switch expression that rejects every illegal transition state machines with sealed types
Break a cycle Replace parent references with IDs object graphs and references
Fake clock A Clock interface and a test that advances time testability and dependency injection
Sharded lock A counter map with four shards thread-safe components
Condition loop A one-slot blocking queue with close, using ReentrantLock and Condition blocking queue
Unsubscribe handle An observer with an AutoCloseable subscription event bus and observers

What to write down each week

Keep one page per week with four headings. The page is what you reread the night before an interview.

  • Patterns I used and the requirement that forced each. Forces the habit of justifying patterns.
  • Java mistakes. For example: exposed a mutable list, held a lock across a callback, used double for money.
  • Questions I forgot to ask. Concurrency, time, failure behavior, scale.
  • Follow-ups I could not answer. These become next week's drills.

Choosing where to spend extra time

Not everyone needs the same balance. Use the first timed attempt in each week to decide.

If you struggle with Spend extra time on
Turning prose into types Week 1 exercises, especially modeling domains in Java
Tangled references between objects Object graphs and references and encapsulation and invariants
Knowing when to use a pattern The signal table in the LLD interview checklist
Finishing in time Repeat small problems: tic-tac-toe and vending machine
Concurrency questions Thread-safe components then blocking queue
Explaining trade-offs Write the "Extensions" answers of each article in your own words

Mock interview prompts

Use these in Week 4 and afterward. Each is a variation on something the course covers, so you can check your answer against the closest article after the attempt. Give yourself 45 minutes and speak aloud.

Prompt Closest article Twist to add after 30 minutes
Design a URL shortener's core library KV store with TTL Links expire; make it thread-safe
Design a hotel booking engine Movie ticket booking Date ranges instead of seats
Design a chess game Tic-tac-toe Add move validation per piece
Design an in-memory job queue Task scheduler Retries with back-off using a fake clock
Design a metrics collector Thread-safe components Many writers, one periodic reader
Design a chat room Event bus and observers Users join and leave during delivery
Design a coffee machine Vending machine Recipes as data, ingredient limits
Design a rate-limited API client LLD rate limiter Different limits per plan

For each prompt, follow the same order: requirements, entities, API, what varies, implementation, scenario walk-through, extensions. After the attempt, score yourself with the rubric and write down the one habit to change.

Self-assessment rubric

After each timed attempt, score yourself from 0 to 2 on each line. A total below 12 out of 16 means redo the problem in two days.

Criterion 0 1 2
Requirements skipped listed listed with out-of-scope and failure cases
Entities nouns only owners named owners, multiplicity, invariants
API vague methods listed methods with error cases
Patterns none or forced some justified each tied to a varying requirement
Java idioms String everywhere, public mutable fields partly idiomatic records, enums, sealed types, private fields, domain exceptions
Correctness does not compile happy path only happy path and errors traced
Testability hidden time and globals some injection clock and dependencies injected
Communication silent some narration trade-offs stated and alternatives named

Common pitfalls when studying

  • Reading only. If you have not typed it, you have not learned it. Retype the core of every solution once.
  • Memorizing solutions. Interviewers change one requirement. Practice the follow-ups in each article's extensions section.
  • Skipping the diagram. The diagram is where owners and multiplicities get decided.
  • Shared mutable state by accident. Practice the Week 2 object-graph exercises until immutable records, IDs and a central owner are automatic.
  • Ignoring time. Always time yourself; the 45-minute limit is part of the skill.

After week 4

Summary

  • Four weeks, one hour a day: foundations, state and object graphs, domain problems, then systems and concurrency with mock interviews.
  • Practice each problem by attempting it timed before reading the solution, then comparing and redoing the weak part.
  • Use the problem-to-skill map to see which patterns and Java skills each exercise drills, and the concept-to-problem map to drill one skill.
  • Score every attempt with the rubric and repeat anything under 12 out of 16.
  • Keep the LLD interview checklist beside you during practice until it is habit.