LLD fundamentals¶
What you need before any object-oriented design round in Python: the language features interviewers expect you to use fluently, SOLID and the principles beyond it, UML in Mermaid, the LLD interview framework, concurrency primitives and clean, testable code. Each page pairs the concept with before/after Python and exercises with collapsed solutions. Read the P0 pages first, then move on to the patterns and problems; come back here whenever a reviewer comment or a failed exercise points at a gap.
Tiers: P0 must be solid before any interview, P1 is expected of a strong SDE2, P2 is stretch material for when the rest is done.
Start here (P0)¶
- Object-oriented Python for interviews
- SOLID in Python
- UML with Mermaid
- The LLD interview framework
- Concurrency for LLD in Python
All pages¶
| # | Page | Tier | Covers |
|---|---|---|---|
| 1 | Object-oriented Python for interviews | P0 | Classes and instances; ABC vs Protocol (nominal vs structural typing, runtime_checkable); dataclasses (frozen, slots, field… |
| 2 | SOLID in Python | P0 | Each principle: definition, smell, Python violation, refactor, how to name it in an interview. |
| 3 | DRY, KISS, YAGNI, Demeter, GRASP and cohesion | P1 | DRY vs accidental duplication; KISS and YAGNI in interviews (do not over-pattern); Law of Demeter; tell-don't-ask; GRASP (Information… |
| 4 | UML with Mermaid | P0 | Class-diagram notation (visibility, static and abstract members, generics, all six relationships, multiplicity, annotations); sequence… |
| 5 | The LLD interview framework | P0 | Steps: clarify use cases, nouns to entities and verbs to methods, relationships and multiplicity, class diagram, interfaces and APIs… |
| 6 | Concurrency for LLD in Python | P0 | GIL implications; threading primitives (Lock, RLock, Condition, Semaphore, BoundedSemaphore, Event, Barrier, Timer); queue.Queue… |
| 7 | Clean code and testing | P1 | Naming, small functions, guard clauses; exception hierarchies (domain errors, no swallowing, EAFP vs LBYL); immutability; pure domain vs IO… |
| 8 | Interfaces, contracts and service APIs in LLD | P1 | Designing class and service interfaces (small Protocols, intention-revealing signatures, result objects vs exceptions, DTOs as frozen… |