Skip to content

HLD + LLD Interview Handbook

Everything an SDE2 candidate needs for system-design (HLD) and object-oriented-design (LLD) rounds at FAANG-style companies — in one place, with diagrams you can redraw and Python you can run.

Every page follows the same spine an interviewer expects, every diagram is drawn to be reproduced on a whiteboard, and every code snippet is embedded from a file that the test suite runs. Numbers come from one canonical estimation sheet, so the arithmetic in every case study is traceable.

  • HLD fundamentals


    27 pages: the 45-minute framework, estimation, caching, databases, replication, partitioning, transactions, CAP, Kafka, consensus, rate limiting, resilience, security, observability, geospatial indexing and more — each with a tested Python implementation of the core idea.

    Fundamentals

  • HLD case studies


    31 systems: URL shortener, news feed, chat, YouTube, Uber, Ticketmaster, payments, Kafka-like queue, S3, Google Docs, stock exchange… Requirements, estimation, API, data model, architecture, 3–5 deep dives, scaling, trade-offs, pacing.

    Case studies

  • LLD fundamentals and patterns


    OOP in Python, SOLID, UML with Mermaid, the LLD interview framework, concurrency, testing — plus all 23 GoF patterns and 8 modern ones, each with the canonical interview example and the Pythonic shortcut.

    Fundamentals · Patterns

  • LLD problems


    36 problems: parking lot, elevator, vending machine, LRU/LFU cache, Splitwise, BookMyShow, chess, text editor, payment wallet, pub/sub… Each a runnable package with tests, class/sequence/state diagrams and a 45-minute walkthrough.

    Problems

  • Cheatsheets


    Latency numbers, database and queue selection matrices, consistency tables, pattern quick reference, HLD/LLD checklists, the 40 most common SDE2 mistakes, clarifying questions, glossary.

    Cheatsheets

  • Mock interviews and roadmap


    Six full 45-minute transcripts (news feed, chat, Ticketmaster, parking lot, elevator, movie booking) with the diagram evolving v1 → v3 and a debrief rubric — plus an 8-week plan and a 1-week crash plan.

    Mocks · Roadmap

How to use it

What makes the pages trustworthy

  • Tested code. Every snippet is included from code/ at build time — the same files pytest runs. If the page shows it, it executes.
  • One set of numbers. Every estimation cites the latency and estimation tables.
  • Diagrams you can redraw. Mermaid flowcharts, sequence, class, state and ER diagrams kept under ~25 nodes — whiteboard-sized on purpose.
  • Interview-first structure. Clarifying questions, follow-ups with model answers, common mistakes and minute-by-minute pacing on every case study and problem.

The source is on GitHub under the MIT license.