LOW-LEVEL DESIGN
(LLD) ROADMAP
By
ABHISHEK
BANSAL
( SDE 3 - GOOGLE )
Objective
Over the last few months, I practiced 50+ LLD problems — one per day — and focused on writing
clean, modular, production-ready code. In this journey, I
✅ Applied SOLID principles.
✅ Used design patterns relevant to real-world modeling.
✅ Followed proper method naming, interface segregation, and concurrency.
✅ Wrote runnable Java code and treated each problem like building a real product.
Linkedin : ABHISHEK BANSAL
✅ Part 1: SOLID Principles (with Java Examples)
1. Single Responsibility Principle (SRP)
A class should have only one reason to change.
❌ Bad :
✅ Good :
💬 Now each class has a clear, single responsibility.
2. Open/Closed Principle (OCP)
Classes should be open for extension, closed for modification.
❌ Bad:
✅ Good (using Strategy Pattern) :
💬 Add new payment types without modifying PaymentProcessor.
3. Liskov Substitution Principle (LSP)
Subclasses should be substitutable for their base classes.
❌ Bad:
✅ Good:
💬 Don’t break expectations of base types.
4. Interface Segregation Principle (ISP)
Clients shouldn't be forced to implement methods they don't use.
❌ Bad:
✅ Good:
5. Dependency Inversion Principle (DIP)
High-level modules should depend on abstractions, not on concrete classes.
❌ Bad:
✅ Good:
💬 Enables decoupling and easier testing.
✅ Part 2: Top 10 Design Patterns (with Java)
1. Strategy Pattern : Define a family of algorithms and make them interchangeable at runtime.
2. Observer Pattern : Notifies multiple observers when subject changes.
3. Factory Pattern : Encapsulate object creation.
4. State Pattern : Allow object behaviour to vary based on internal state.
5. Singleton Pattern : Ensure a class has only one instance.
6. Command Pattern: Encapsulate a request as an object (supports undo/redo).
7. Builder Pattern : Simplify object creation with many optional fields.
8. Adapter Pattern : Convert one interface into another.
9. Decorator Pattern : Add functionality to objects dynamically.
10. Prototype Pattern : Clone existing objects instead of creating new ones.
✅ Part 3: 50+ Real-World LLD Questions (with
Design Focus & Patterns)
These questions were the core of my daily practice. I recommend picking one each day and solving
it fully — from class diagrams to working code with tests.
📌 For each question:
1. Start with a class diagram — model the real world
2. Identify where patterns like Strategy, Observer, Factory fit
3. Apply at least one SOLID principle
4. Code a working prototype in Java (with main method)
5. Simulate different scenarios and handle edge cases
6. Bonus: Add concurrency/threading where realistic
System Focus Areas & Suggested Patterns
1) Parking Lot Strategy Pattern (slot selection), Singleton
(EntryManager), OCP
2) Elevator System Observer Pattern (request queue), State Pattern (Idle,
Moving, etc.)
3) Library Management System SRP, Builder (Book/User creation), OCP
4) Amazon Locker Service Observer (notifications), Scheduling logic, Factory
5) Vending Machine State Pattern (Idle, HasMoney, Dispensing), Strategy
6) Online Blackjack Game Strategy (game rules), Factory (cards), State (player turns)
7) Meeting Scheduler Composite Pattern (recurring meetings), ConflictResolver
class
8) Movie Ticket Booking System Decorator (seat types), Factory (tickets), Singleton
(TheatreService)
9) Car Rental System Strategy (pricing), Factory (car objects), Builder
10) ATM State (Card Inserted, Pin Entered, Cash Dispensed),
Command (transactions)
11) Chess Game Command (move/undo), Strategy (piece logic), Memento
12) Hotel Management System Builder (rooms), Strategy (pricing), SRP (cleaners, billing)
13) Amazon Online Shopping System Observer (order updates), Factory (items), Strategy
(discount rules)
14) Stack Overflow Observer (comment/vote notify), Decorator (badges),
Command
15) Restaurant Management System Command (place order), State (preparing, served), SRP
16) Facebook Feed Observer (post updates), Strategy (ranking), Caching
17) Online Stock Brokerage System Strategy (order matching), Command (trades), Singleton
(Exchange)
18) Jigsaw Puzzle Game OOP modeling, Grid system, Factory (piece shapes)
19) Airline Management System Strategy (pricing), Composite (flights/legs), Observer
(updates)
20) Cricinfo Engine Observer (live events), Decorator (score highlights),
Command
21) LinkedIn Graph traversal (connections), Caching (profile info), SRP
22) Uber-like Cab Booking Strategy (matching), Observer (live location), State (trip)
23) Zomato/Food Delivery Observer (delivery updates), Strategy (ETA calculation)
24) Instagram Reels Observer (likes/comments), Caching (feeds), Factory
(content)
25) Twitter Clone Observer (followers), Composite (retweets), Command
(tweets)
26) Flipkart Flash Sale Locking, Singleton (InventoryManager), State (sale states)
27) Learning Platform (e.g. Coursera) Builder (Course), Strategy (pricing plans), SRP
28) Zoom/Google Meet Clone Composite (participants), Observer (chat/video),
Command
29) Fantasy League App Strategy (scoring rules), Factory (players), Decorator
30) GitHub Clone Command (pull requests), Observer (notifications), SRP
31) Discord/Slack Observer (messages), Strategy (notification settings), SRP
32) Online Compiler Strategy (language interpreters), Isolation (sandboxing),
SRP
33) Sports Tournament System Strategy (single-elim, round-robin), Builder
(teams/schedule)
34) Quiz App Builder (quiz setup), Command (answer flow), Timer
35) Ride Pooling System Graph modeling, Strategy (match algorithm), Observer
(status)
36) Banking System Singleton (AccountService), Command (transaction),
Strategy (fees)
37) Interview Scheduler System Strategy (panel matching), SRP, Factory (round types)
38) Course Recommender Graph search (BFS/DFS), Observer (alerts), Caching
39) Hospital Management SRP (appointments, records), Observer (reminders),
Factory
40) Ticketmaster Booking System Locking (seat hold), Builder (event setup), Strategy
41) WhatsApp Clone Observer (message delivery), Command (chat history),
SRP
42) News Aggregator Strategy (ranking), Adapter (external APIs), Observer
43) Resume Parser Strategy (file formats), Builder (user profile), Factory
44) Cab Billing System Strategy (pricing models), Factory (fare), Singleton
45) Smart Home Automation Observer (sensor updates), Command (device control)
46) Calendar App Composite (events), Command (reminders), SRP
47) Online Game Store Command (purchases), Observer (download status),
Decorator
48) PDF Editor Command (undo/redo), Builder (PDF structure), State
49) Expense Tracker (Splitwise) Strategy (split logic), Builder (expense group), Observer
50) Voice Assistant System Command (user intent), Strategy (action resolution), SRP