Goal: Month 4 begins — learn the design patterns that show up in every LLD interview. By Friday you should be able to name, explain, and implement at least 7 patterns from memory.
Topics
| Day | Focus | Topics |
|---|---|---|
| Mon | LLD Design Principles | DRY, KISS, and YAGNI · Coupling and Cohesion · Singleton Pattern |
| Tue | Creational & Structural Patterns | Factory Pattern · Adapter Pattern · Decorator Pattern |
| Wed | Structural & Behavioral Patterns | Facade Pattern · Observer Pattern · Strategy Pattern |
| Thu | DSA Dynamic Programming | 2D DP Patterns · Knapsack Patterns |
| Fri | Redis Deep Dive | Redis Data Types and Commands |
Key Concepts
- When Singleton becomes an anti-pattern — global state, hidden dependencies, testing nightmares
- Factory vs Builder — Factory for object families, Builder for complex construction with many optional params
- Adapter for incompatible interfaces — wrap a third-party class to match your expected interface
- Decorator for runtime extension — add behavior without subclassing (think Java I/O streams)
- Facade for simplified APIs — hide subsystem complexity behind a single clean interface
- Observer for event systems — publisher-subscriber decoupling, the backbone of reactive programming
- Strategy for interchangeable algorithms — swap sorting, pricing, or payment logic at runtime
- 0/1 knapsack vs unbounded knapsack — the subtle difference that changes the entire DP transition
- 2D DP grids — unique paths, minimum path sum, edit distance
- Redis strings, lists, sets, sorted sets, hashes — know when to use each data structure
Practice
- Implement the Observer pattern for a notification system (email + SMS + push subscribers)
- Implement the Strategy pattern for a payment processor (credit card, PayPal, crypto)
- Solve the 0/1 knapsack problem — then modify it for unbounded knapsack and compare
- Use Redis CLI to model a leaderboard with sorted sets
~13 topics · ~1.5-2 hrs/day · Focus: read the linked notes, then code each concept