[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82145":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},82145,"engineering-handbook","handbook-academy\u002Fengineering-handbook","handbook-academy","Open-source High-Level System Design and Data Structure & Algorithm handbook. CC BY-SA 4.0, Free Forever.","https:\u002F\u002Fhandbook.academy",null,"JavaScript",326,9,1,0,3,87,142,11,"Creative Commons Attribution Share Alike 4.0 International",false,"main",true,[],"2026-06-12 02:04:23","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"logo.svg\" alt=\"Handbook Academy\" width=\"160\" \u002F>\n\n# The Engineering Handbook\n\n**Open-source engineering curricula under one CC BY-SA 4.0 license. HLD and DSA today; more to come.**\n\nHLD Handbook: 159 chapters + 22 trade-off pages · 181 pages · ~773,000 words · 719 Mermaid diagrams · 3,100+ citations\nDSA Handbook: 120 chapters across 15 parts · 37 pattern decision pages · 5 long-form editorials · ~470,000 words · 226 Mermaid diagrams · sibling Python \u002F Java \u002F C++ \u002F Go solutions for 155 LeetCode problems · 46 interactive widget specs\n\n[![License: CC BY-SA 4.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-CC%20BY--SA%204.0-blue.svg)](LICENSE)\n[![PRs Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![CI](https:\u002F\u002Fgithub.com\u002Fhandbook-academy\u002Fengineering-handbook\u002Factions\u002Fworkflows\u002Fcontent-ci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fhandbook-academy\u002Fengineering-handbook\u002Factions)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fhandbook-academy\u002Fengineering-handbook?style=social)](https:\u002F\u002Fgithub.com\u002Fhandbook-academy\u002Fengineering-handbook\u002Fstargazers)\n\n**Read free at [handbook.academy](https:\u002F\u002Fhandbook.academy)** — landing page links to both books · HLD at [hld.handbook.academy](https:\u002F\u002Fhld.handbook.academy) · DSA at [dsa.handbook.academy](https:\u002F\u002Fdsa.handbook.academy) *(public beta)*\n\n[Start reading](#start-reading) · [HLD curriculum](#the-full-hld-curriculum) · [DSA curriculum](#the-full-dsa-curriculum) · [Trade-offs](#trade-offs-library-22-pages) · [Contributing](#contributing)\n\n\u003C\u002Fdiv>\n\n---\n\n## Table of Contents\n\n- [What this is](#what-this-is)\n- [Reading the handbooks online](#reading-the-handbooks-online)\n- [What's in this repo](#whats-in-this-repo)\n- [Why this exists](#why-this-exists)\n- [Who this is for](#who-this-is-for)\n- [How these handbooks compare](#how-these-handbooks-compare)\n- [Start reading](#start-reading)\n- [The full HLD curriculum](#the-full-hld-curriculum) — 12 parts + 22-page Trade-offs Library\n- [The full DSA curriculum](#the-full-dsa-curriculum) — 15 parts + 37 pattern decision pages + editorials + 46 widgets\n- [Study plans](#study-plans)\n- [Project statistics](#project-statistics)\n- [Quality standards](#quality-standards)\n- [Contributing](#contributing)\n- [Project structure](#project-structure)\n- [Development setup](#development-setup)\n- [Governance](#governance)\n- [FAQ](#faq)\n- [License](#license)\n- [Citation](#citation)\n- [Acknowledgments](#acknowledgments)\n- [Community](#community)\n\n---\n\n## What this is\n\nThis repository hosts **two sibling open-source engineering handbooks** under `content\u002F`, sharing the same CC BY-SA 4.0 license, the same contribution workflow, and the same CI quality bar:\n\n- **The HLD Handbook** (`content\u002Fhld\u002F`) — an opinionated, end-to-end textbook on high-level software design, distributed systems, and modern infrastructure. 159 teaching chapters across 12 parts plus a 22-page Trade-offs Library — 181 pages, ~773,000 words, 719 Mermaid diagrams, 3,100+ citations. Equivalent in scope to a **~2,400-page book** — longer than *Designing Data-Intensive Applications* and Alex Xu's *System Design Interview* volumes 1+2 combined. Covers TCP\u002FIP and the OS contract through to LLM serving, multi-agent orchestration, and post-quantum crypto.\n- **The DSA Handbook** (`content\u002Fdsa\u002F`) — a practice-first data-structures-and-algorithms curriculum aimed at coding interviews and competitive programming. 120 chapters across 15 parts plus 37 pattern decision pages, 5 long-form LC editorials, and 46 interactive widget specs. ~470,000 words, 226 Mermaid diagrams. Each chapter teaches a structure or pattern, then walks the canonical LeetCode problems, with sibling `sol.py` \u002F `sol.java` \u002F `sol.cpp` \u002F `sol.go` files for 155 problems. Python is inlined in the chapter; the other three languages are linked.\n\n> **More curricula are planned.** This repo is structured as an umbrella so additional handbooks (e.g. operating systems, databases, ML systems) can land alongside HLD and DSA over time, sharing the same workflow and license.\n\nEvery concept in either handbook is taught **inline** as a full-length article: introduction, first-principles explanation, diagrams, worked examples, trade-offs, production gotchas, citations to primary sources. No stubs. No \"coming soon.\" No external blog redirects. No bullet outlines that tell you to go somewhere else to actually learn.\n\nEvery `.md` file under `content\u002F` also renders natively on GitHub — all 945 Mermaid diagrams display in the GitHub UI, all footnotes work, all cross-references resolve. The websites add search, dark mode, per-chapter diagram zoom, social cards, OG images, the interactive DSA widgets, and fast client-side navigation.\n\nBoth handbooks are continuously updated. Every chapter's frontmatter declares `date_created` and `date_updated`, so you can see exactly how fresh each page is. We care about numbers being right today, not right in 2022.\n\n## Reading the handbooks online\n\nEach book has its own subdomain. The umbrella landing page links to both:\n\n| Site | URL | What it serves |\n|------|-----|----------------|\n| **Landing page** | [handbook.academy](https:\u002F\u002Fhandbook.academy) | Two cards — pick HLD or DSA. |\n| **HLD Handbook** | [hld.handbook.academy](https:\u002F\u002Fhld.handbook.academy) | The full HLD curriculum. |\n| **DSA Handbook** | [dsa.handbook.academy](https:\u002F\u002Fdsa.handbook.academy) | The full DSA curriculum, with interactive widgets. |\n\nEach subdomain serves one book at the root — URLs do not nest. HLD chapters live at `hld.handbook.academy\u002Fcurriculum\u002F...`, not `handbook.academy\u002Fhld\u002F...`. Same for DSA.\n\n## What's in this repo\n\nThis repository is the **canonical content source** for both books. PRs to either handbook are welcome.\n\n- **[`content\u002Fhld\u002F`](content\u002Fhld\u002F)** — 159 HLD chapters across 12 parts + 22 trade-off decision pages. The chapter template is intro → first principles → diagrams → worked example → trade-offs → production gotchas → references. See [STYLE_GUIDE.md](STYLE_GUIDE.md).\n- **[`content\u002Fdsa\u002F`](content\u002Fdsa\u002F)** — 120 DSA chapters across 15 parts. The chapter template is practice-first: cheat-sheet table, deep dive on the structure or pattern, prompt cards for representative LeetCode problems, and `\u003Cdetails>` solution + common-mistakes blocks. Code samples live as sibling files (`sol.py`, `sol.java`, `sol.cpp`, `sol.go`) under each chapter's directory. See [STYLE_GUIDE.md § DSA-specific deviations](STYLE_GUIDE.md#dsa-specific-deviations) and [`content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F00-arrays.md`](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F00-arrays.md) as the canonical example.\n- **`content\u002Fdsa\u002Feditorials\u002F`** — long-form LeetCode editorials covering hard problems with multiple approaches.\n- **`content\u002Fdsa\u002Fpatterns\u002F`** — pattern decision references that compare interchangeable approaches (e.g. recursion vs iteration, BFS vs DFS, sliding window vs prefix sum).\n- **`content\u002Fdsa\u002Fwidgets\u002F`** — 46 YAML specs for the interactive widgets that render on the DSA website. On GitHub these are callouts that link to the spec; on the website the widget renders.\n- **`content\u002Fdsa\u002F_problem-registry.yml`** — canonical `LC-NNN` ID registry; the website source-of-truth for every LeetCode problem the curriculum touches.\n\n## Why this exists\n\nThe open-source curricula for system design and DSA have a shape, and that shape is frustrating:\n\n- **Link dumps** — curated lists that point at dozens of scattered blog posts, LeetCode discuss threads, and talks. Great for discovery, useless as a learning path. You end up with 60 tabs open and no through-line.\n- **Teaser-and-redirect repos** — READMEs with a few hundred words on each topic that nudge you toward a paid course hosted elsewhere. The GitHub repo is the marketing page; the actual teaching is behind a $150-$400+\u002Fyear paywall.\n- **Monolithic READMEs frozen in time** — a single 5,000-line `README.md` that was great in 2021 but hasn't kept up with the modern stack. No LLM serving, no CRDTs, no post-quantum crypto, no FinOps. And nobody wants to review a PR against a 5,000-line file.\n- **Surface-level outlines** — bullet-point summaries that tell you *what* exists without explaining *why* you'd pick one approach over another. You learn the vocabulary without the judgment.\n- **Interview-only prep** — focused on passing a specific 45-minute screen, not on actually operating systems at scale or actually understanding the algorithm.\n\nThese handbooks fix all of that:\n\n- **100% inline content.** Every chapter is a full teaching article written from scratch, living in this repo as plain Markdown. Nothing is a stub. Nothing redirects you elsewhere to learn.\n- **Progressive curricula.** HLD has 159 teaching chapters across 12 parts plus a 22-page Trade-offs Library, sequenced from prerequisites (Part 0) to Staff+ topics. DSA has 120 chapters across 15 parts, from arrays to bitmask DP, with each part introducing a tighter pattern family. Each chapter declares its prerequisites, learning objectives, estimated reading time, and difficulty tier.\n- **Research-backed.** Every HLD chapter ends with a **Further Reading & References** section citing primary sources — SIGMOD and OSDI papers, RFCs, IETF drafts, engineering postmortems, official docs, canonical books. **3,100+ citations** across HLD. DSA chapters cite the original papers behind each algorithm where they exist (Floyd, Tarjan, Knuth-Morris-Pratt, Aho-Corasick).\n- **Opinionated.** Every topic picks a recommended approach and explains *why*. Where reasonable people disagree, the trade-offs are made explicit — HLD has a dedicated 22-page Trade-offs Library; DSA has 37 pattern decision pages that compare interchangeable approaches (recursion vs iteration, BFS vs DFS, sliding window vs prefix sum, and so on).\n- **Modern (2025+).** HLD covers LLM serving, RAG pipelines, AI agents, multi-agent orchestration, CRDTs, edge computing, FinOps, post-quantum cryptography, platform engineering, local-first software, differential privacy, MCP. DSA covers the modern competitive-programming toolkit: monotonic stacks\u002Fdeques, Morris traversal, suffix arrays, Aho-Corasick, bitmask DP, randomised algorithms.\n- **Practice-first for DSA.** Every DSA chapter ships with sibling code samples in **Python, Java, C++, and Go** for the canonical LeetCode problems it teaches. Python is inlined in the chapter; the other three languages are one click away. 155 LeetCode problems are covered in this format.\n- **Interactive on the website.** The DSA book's 46 widget specs render as live, animated visualisations on `dsa.handbook.academy` (sliding windows that you can drag, monotonic stacks that animate the pop sequence, etc.). On GitHub the widget callouts link to the YAML spec.\n\n## Who this is for\n\nThese handbooks are written for:\n\n- **SDE1 engineers preparing for SDE2 interviews.** Read **DSA Parts 0-9** for coding-round fluency, then **HLD Part 0 + Part 1 + Part 11**, plus 8-10 targeted case studies from HLD Part 8, plus the top-5 most-cited trade-off pages.\n- **SDE2s preparing for Senior\u002FStaff.** The full **HLD Parts 3-7** are the core \"you need to know this to design anything meaningful\" material. Parts 6 (Reliability) and 7 (Security) separate Senior candidates from Staff candidates. **DSA Part 14** covers narration and trade-off articulation in the algorithmic round.\n- **Senior\u002FStaff engineers refreshing or filling gaps.** **HLD Part 9** (AI\u002FML systems) and the Trade-offs Library are valuable even if you've been doing this for 15 years. Modern LLM serving and vector search weren't a thing when most of us learned backend.\n- **Self-taught engineers without a CS degree** who want the vocabulary and the reasoning that bootcamps and YouTube don't teach. **HLD Part 0** is explicit prerequisites: TCP\u002FIP, the OS contract, database internals, API design. **DSA Part 0** is the foundations — Big-O, recursion, bit manipulation — before pattern-matching becomes useful.\n- **Career switchers** moving from adjacent roles (frontend → backend, backend → infra, SWE → MLE) who need to build system-level intuition fast.\n- **Competitive programmers and ICPC\u002FCodeforces contestants** who want a structured reference for the algorithmic toolkit (KMP, Aho-Corasick, suffix arrays, segment trees, Dijkstra, Bellman-Ford, DP variants).\n- **Teachers and course creators** who want to build curriculum without writing thousands of pages from scratch. The CC BY-SA 4.0 license explicitly allows this.\n- **Anyone operating a production system at non-trivial scale** who wants a reference shelf that covers the full stack — from packet-level networking to multi-tenant SaaS isolation models.\n\n**These handbooks are NOT for:**\n\n- **Absolute beginners with no programming experience.** HLD Part 0 assumes you can read code and have built at least one CRUD app. DSA Part 0 assumes you can write a `for` loop and a recursive function. If you're brand new, start with [The Odin Project](https:\u002F\u002Fwww.theodinproject.com\u002F) or [CS50](https:\u002F\u002Fcs50.harvard.edu\u002F), then come back.\n- **People who want low-level language-specific tutorials.** We don't teach Rust syntax or Go's goroutines — we teach concepts that apply across languages.\n\n## How these handbooks compare\n\n|                                           | This repo (HLD + DSA) | Typical OSS system-design repos | Typical OSS DSA repos | Paid courses (\\$150-\\$400+\u002Fyr) | O'Reilly-style books |\n| ----------------------------------------- | :-------------------: | :-----------------------------: | :-------------------: | :----------------------: | :------------------: |\n| Free and open-source                      |          Yes          |               Yes               |          Yes          |            No            |          No          |\n| 100% inline content (no external redirects)|         Yes          |               No                |          No           |            Yes           |          Yes         |\n| Both HLD + DSA in one curriculum          |          Yes          |               No                |          No           |          Rarely          |          No          |\n| 150+ HLD chapters, 100+ DSA chapters      |          Yes          |               No                |          No           |     Only their sliver    |   Usually one topic  |\n| 56 end-to-end HLD case studies            |          Yes          |          5-15 typical           |           —           |       15-25 typical      |        Varies        |\n| Sibling code in Python \u002F Java \u002F C++ \u002F Go  |          Yes          |                —                |       Rarely all 4    |        Sometimes         |        Rarely        |\n| Interactive widgets on the DSA site       |          Yes          |                —                |          No           |        Sometimes         |          No          |\n| Dedicated Trade-offs Library (22 pages)   |          Yes          |               No                |           —           |            No            |          No          |\n| 37 DSA pattern decision pages             |          Yes          |                —                |          No           |            No            |          No          |\n| Covers LLMs, RAG, agents, multimodal AI   |          Yes          |           Rarely modern         |           —           |        Sometimes         |        Rarely        |\n| Opinionated decisions, not just options   |          Yes          |               No                |          No           |        Sometimes         |        Varies        |\n| 3,100+ primary-source citations           |          Yes          |               No                |           —           |            No            |          Yes         |\n| Community-editable, PRs welcome           |          Yes          |               Yes               |          Yes          |            No            |          No          |\n| Updated continuously                      |          Yes          |          Often frozen           |     Often frozen      |          Varies          |    Every 3-5 years   |\n\n## Start reading\n\n> **For the best reading experience, visit [hld.handbook.academy](https:\u002F\u002Fhld.handbook.academy)** for HLD or **[dsa.handbook.academy](https:\u002F\u002Fdsa.handbook.academy)** for DSA — free, no sign-up, full search, dark mode, per-chapter diagram zoom, and the live DSA widgets. The links below open the source on GitHub, where Mermaid diagrams also render natively.\n\nPick one:\n\n**I want a quick HLD taste.** Read these three in order — they give you the vocabulary and the first real worked example:\n\n1. [Scalability: Growing a System Without Breaking It](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F00-scalability.md)\n2. [Back-of-the-Envelope Estimation](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F04-back-of-envelope-estimation.md)\n3. [Design a URL Shortener (TinyURL \u002F bit.ly)](content\u002Fhld\u002Fpart-8-case-studies\u002F00-url-shortener.md)\n\n**I want a quick DSA taste.** Read these three to see the chapter shape and the sibling-code workflow:\n\n1. [Arrays: static, dynamic, multi-dimensional](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F00-arrays.md)\n2. [Two pointers: opposite ends](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F00-two-pointers-opposite.md)\n3. [Sliding window: variable size](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F03-sliding-window-variable.md)\n\n**I'm preparing for an SDE2 interview in the next 6 weeks.** Follow the [SDE1 → SDE2 study plan](#sde1--sde2--6-week-interview-prep).\n\n**I'm a Senior engineer refreshing my distributed-systems foundations.** Read [HLD Part 3 — Distributed Systems Theory](#part-3--distributed-systems-theory-11-chapters) straight through.\n\n**I want to learn AI-systems design.** Read [HLD Part 9 — AI & ML System Design](#part-9--ai--ml-system-design-15-chapters) + the 8 AI case studies in [Part 8](#part-8--case-studies-56-chapters) (chapters 30-37).\n\n**I want to grind interview algorithms.** Open [the DSA curriculum](#the-full-dsa-curriculum). Read Parts 0-2 in order, then jump into the pattern parts (3-9) as the problems you encounter call for them.\n\n**I want to read both books cover-to-cover.** Start at [HLD Part 0](#part-0--prerequisites-5-chapters) for the systems track and [DSA Part 0](#the-full-dsa-curriculum) for the algorithms track. At one 25-minute chapter per day, the whole repo is roughly a year of reading.\n\n---\n\n## The full HLD curriculum\n\n**181 pages across 12 parts + a 22-page Trade-offs Library.** Each part below is collapsed by default — click to expand the chapter list. Linking to a specific part from elsewhere in the README auto-expands it on GitHub.\n\n| # | Part | Chapters | Difficulty | Reading time |\n|---|------|---------:|------------|-------------:|\n| 0 | [Prerequisites](#part-0--prerequisites-5-chapters) | 5 | Beginner | ~3 hrs |\n| 1 | [Core Fundamentals](#part-1--core-fundamentals-7-chapters) | 7 | Beginner-Intermediate | ~4 hrs |\n| 2 | [Building Blocks](#part-2--building-blocks-16-chapters) | 16 | Intermediate | ~10 hrs |\n| 3 | [Distributed Systems Theory](#part-3--distributed-systems-theory-11-chapters) | 11 | Intermediate-Advanced | ~9 hrs |\n| 4 | [Data Systems](#part-4--data-systems-10-chapters) | 10 | Intermediate-Advanced | ~8 hrs |\n| 5 | [Architecture Patterns](#part-5--architecture-patterns-11-chapters) | 11 | Intermediate | ~8 hrs |\n| 6 | [Reliability & Operations](#part-6--reliability--operations-11-chapters) | 11 | Intermediate-Advanced | ~8 hrs |\n| 7 | [Security at Scale](#part-7--security-at-scale-10-chapters) | 10 | Intermediate-Advanced | ~7 hrs |\n| 8 | [Case Studies](#part-8--case-studies-56-chapters) | 56 | Intermediate-Advanced | ~45 hrs |\n| 9 | [AI & ML System Design](#part-9--ai--ml-system-design-15-chapters) | 15 | Intermediate-Advanced | ~11 hrs |\n| 10 | [Emerging Patterns](#part-10--emerging-patterns-1-chapter) | 1 | Intermediate-Advanced | ~45 min |\n| 11 | [Interview Framework](#part-11--interview-framework-6-chapters) | 6 | Intermediate | ~4 hrs |\n| T | [Trade-offs Library](#trade-offs-library-22-pages) | 22 | Intermediate | ~8 hrs |\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 0 — Prerequisites (5 chapters)\u003C\u002Fstrong> — networking, OS, data structures, databases, API design\u003C\u002Fsummary>\n\n### Part 0 — Prerequisites (5 chapters)\n\n> **Audience:** engineers without a CS degree, or anyone who wants to confirm their foundations before moving on.\n> **Difficulty:** Beginner. **Total reading time:** ~3 hours.\n\nFoundational topics that the rest of the handbook assumes. If you can explain TCP's three-way handshake, the difference between a process and a thread, a B-tree's internal structure, and why idempotent PUT is better than non-idempotent POST for a retry-prone endpoint — you can skip this part.\n\n1. [Networking Fundamentals for System Design](content\u002Fhld\u002Fpart-0-prerequisites\u002F00-networking-fundamentals.md) — OSI and TCP\u002FIP layers, TCP vs UDP, HTTP\u002F1.1 vs HTTP\u002F2 vs HTTP\u002F3, DNS resolution, TLS handshake, what \"the network is unreliable\" really means in practice.\n2. [Operating System Essentials for System Design](content\u002Fhld\u002Fpart-0-prerequisites\u002F01-os-essentials.md) — Processes vs threads, context switching cost, virtual memory, page cache, filesystem I\u002FO, epoll\u002Fkqueue\u002FIOCP, why `O_DIRECT` matters for databases.\n3. [Data Structures for Distributed Systems](content\u002Fhld\u002Fpart-0-prerequisites\u002F02-data-structures-for-systems.md) — Hash tables, B-trees, LSM-trees, skip lists, Bloom filters, tries, HyperLogLog, Count-Min Sketch, and when each shows up in real systems.\n4. [Database Fundamentals for System Design](content\u002Fhld\u002Fpart-0-prerequisites\u002F03-database-fundamentals.md) — Transactions, isolation levels (read-committed to serializable), indexes, query planners, joins, and why your ORM hides things from you that you need to see.\n5. [API Design Basics: REST, GraphQL, gRPC, and the Hard Parts](content\u002Fhld\u002Fpart-0-prerequisites\u002F04-api-design-basics.md) — Resource modeling, idempotency, versioning, pagination, rate-limit headers, error envelopes, HATEOAS in theory vs practice.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 1 — Core Fundamentals (7 chapters)\u003C\u002Fstrong> — scalability, latency, availability, consistency, estimation, trade-off thinking\u003C\u002Fsummary>\n\n### Part 1 — Core Fundamentals (7 chapters)\n\n> **Audience:** everybody — read this part even if you know the topic, because the vocabulary here is used for the rest of the book.\n> **Difficulty:** Beginner-Intermediate. **Total reading time:** ~4 hours.\n\nThe vocabulary and the reasoning habits that every later chapter assumes. \"Scalability,\" \"consistency,\" \"trade-off,\" and \"back-of-envelope\" get defined here rigorously so they mean something specific when we use them later.\n\n1. [Scalability: Growing a System Without Breaking It](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F00-scalability.md)\n2. [Latency and Throughput: The Two Numbers That Matter](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F01-latency-and-throughput.md)\n3. [Availability and Reliability: Nines, SLOs, and Staying Up](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F02-availability-and-reliability.md)\n4. [Consistency Models: What Readers Actually See](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F03-consistency-models.md)\n5. [Back-of-the-Envelope Estimation](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F04-back-of-envelope-estimation.md)\n6. [How to Approach a System Design Question](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F05-how-to-approach-design-questions.md)\n7. [Trade-off Thinking](content\u002Fhld\u002Fpart-1-core-fundamentals\u002F06-trade-off-thinking.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 2 — Building Blocks (16 chapters)\u003C\u002Fstrong> — load balancers, caches, queues, CDNs, databases, sharding, pub\u002Fsub, rate limiting, blob storage, geo, edge\u003C\u002Fsummary>\n\n### Part 2 — Building Blocks (16 chapters)\n\n> **Audience:** anyone who'll assemble backend systems. This part is the Lego brick inventory.\n> **Difficulty:** Intermediate. **Total reading time:** ~10 hours.\n\nDeep dives on the pieces you assemble to build real systems: load balancers, caches, queues, CDNs, databases (SQL and NoSQL), partitioning, replication, pub\u002Fsub, rate limiters, service discovery, blob storage, geospatial indexes, and edge compute.\n\n1. [Load Balancers: Spreading Traffic, Absorbing Failure](content\u002Fhld\u002Fpart-2-building-blocks\u002F00-load-balancers.md)\n2. [Reverse Proxies and API Gateways: The Smart Edge](content\u002Fhld\u002Fpart-2-building-blocks\u002F01-reverse-proxies-api-gateways.md)\n3. [Content Delivery Networks: Moving Bytes Closer to Users](content\u002Fhld\u002Fpart-2-building-blocks\u002F02-cdns.md)\n4. [Caching: From Browser to Database](content\u002Fhld\u002Fpart-2-building-blocks\u002F03-caching.md)\n5. [SQL Databases: The Boring Technology That Wins](content\u002Fhld\u002Fpart-2-building-blocks\u002F04-sql-databases.md)\n6. [NoSQL Databases: Picking the Right Non-Relational Tool](content\u002Fhld\u002Fpart-2-building-blocks\u002F05-nosql-databases.md)\n7. [Database Partitioning and Sharding: When One Node Is Not Enough](content\u002Fhld\u002Fpart-2-building-blocks\u002F06-database-partitioning-sharding.md)\n8. [Database Replication: Keeping Copies in Sync](content\u002Fhld\u002Fpart-2-building-blocks\u002F07-database-replication.md)\n9. [Message Queues and Streaming: Decoupling at Scale](content\u002Fhld\u002Fpart-2-building-blocks\u002F08-message-queues-streaming.md)\n10. [Pub\u002FSub: Fan-Out and Event-Driven Systems](content\u002Fhld\u002Fpart-2-building-blocks\u002F09-pub-sub.md)\n11. [Real-Time Communication: WebSockets, SSE, and Long Polling](content\u002Fhld\u002Fpart-2-building-blocks\u002F10-real-time-communication.md)\n12. [Rate Limiting: Protecting Systems from Themselves](content\u002Fhld\u002Fpart-2-building-blocks\u002F11-rate-limiting.md)\n13. [Service Discovery and Service Mesh: Finding and Talking to Services](content\u002Fhld\u002Fpart-2-building-blocks\u002F12-service-discovery-mesh.md)\n14. [Blob and Object Storage: Storing the Big Stuff](content\u002Fhld\u002Fpart-2-building-blocks\u002F13-blob-object-storage.md)\n15. [Geospatial Indexing: Geohash, Quadtree, R-tree, S2, and H3](content\u002Fhld\u002Fpart-2-building-blocks\u002F14-geospatial-indexing.md)\n16. [Edge Computing (Cloudflare Workers, Lambda@Edge, Deno Deploy)](content\u002Fhld\u002Fpart-2-building-blocks\u002F15-edge-computing.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 3 — Distributed Systems Theory (11 chapters)\u003C\u002Fstrong> — consensus, consistency, clocks, CRDTs, transactions\u003C\u002Fsummary>\n\n### Part 3 — Distributed Systems Theory (11 chapters)\n\n> **Audience:** SDE2+ preparing for Senior\u002FStaff. If you haven't internalized linearizability vs serializability, read this.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~9 hours.\n\nThe theory that makes distributed systems *distributed*: consensus (Raft\u002FPaxos), the full consistency spectrum, CAP\u002FPACELC in 2025 framing, logical clocks, CRDTs, distributed transactions (2PC\u002FSaga), exactly-once delivery, failure detection, consistent hashing, and Merkle-tree anti-entropy.\n\n1. [Consensus Protocols: How Distributed Systems Agree](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F00-consensus-protocols.md)\n2. [Consistency Deep Dive: Linearizability, Serializability, and the Spectrum Between](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F01-consistency-deep-dive.md)\n3. [Quorums and Replication: The Math of R + W > N](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F02-quorums-and-replication.md)\n4. [CAP and PACELC: The Tradeoff That Keeps Confusing People](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F03-cap-and-pacelc.md)\n5. [Clocks and Ordering: Lamport, Vector, and Hybrid Logical Clocks](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F04-clocks-and-ordering.md)\n6. [CRDTs: Conflict-Free Replicated Data Types](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F05-crdts.md)\n7. [Distributed Transactions: 2PC, Saga, and When to Avoid Both](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F06-distributed-transactions.md)\n8. [Idempotency and Exactly-Once: The Honest Truth About Delivery Guarantees](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F07-idempotency-exactly-once.md)\n9. [Failure Detection: Deciding a Node Is Dead](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F08-failure-detection.md)\n10. [Consistent Hashing: Keys to Nodes Without Global Reshuffles](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F09-consistent-hashing.md)\n11. [Merkle Trees and Anti-Entropy: Keeping Replicas in Sync Cheaply](content\u002Fhld\u002Fpart-3-distributed-systems-theory\u002F10-merkle-trees-anti-entropy.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 4 — Data Systems (10 chapters)\u003C\u002Fstrong> — storage engines, OLTP\u002FOLAP, warehouses\u002Flakes, streams, search, time-series, graph, vector, KV\u003C\u002Fsummary>\n\n### Part 4 — Data Systems (10 chapters)\n\n> **Audience:** anyone who owns a data pipeline or picks a database.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~8 hours.\n\nEvery flavor of data system you might pick, and when each actually fits. Storage engines (B-tree vs LSM), OLTP vs OLAP, warehouses\u002Flakes\u002Flakehouses, streaming vs batch, CDC, search, time-series, graph, vector, and key-value.\n\n1. [Storage Engines: B-Trees, LSM-Trees, and Why Your Database Feels the Way It Does](content\u002Fhld\u002Fpart-4-data-systems\u002F00-storage-engines.md)\n2. [OLTP vs OLAP: Row Stores, Column Stores, and Matching Shape to Workload](content\u002Fhld\u002Fpart-4-data-systems\u002F01-oltp-vs-olap.md)\n3. [Data Warehouses and Data Lakes: Structure, Schema, and the Lakehouse](content\u002Fhld\u002Fpart-4-data-systems\u002F02-data-warehouses-lakes.md)\n4. [Stream vs Batch Processing: Lambda, Kappa, and the End of That Debate](content\u002Fhld\u002Fpart-4-data-systems\u002F03-stream-vs-batch.md)\n5. [Change Data Capture: Streaming the Database's Inner Monologue](content\u002Fhld\u002Fpart-4-data-systems\u002F04-change-data-capture.md)\n6. [Search Systems: Inverted Indexes, BM25, and Running Elasticsearch in Production](content\u002Fhld\u002Fpart-4-data-systems\u002F05-search-systems.md)\n7. [Time-Series Databases: Metrics, Events, and Retention at Scale](content\u002Fhld\u002Fpart-4-data-systems\u002F06-time-series-databases.md)\n8. [Graph Databases: Property Graphs, Cypher, and When Joins Are the Problem](content\u002Fhld\u002Fpart-4-data-systems\u002F07-graph-databases.md)\n9. [Vector Databases: Embeddings, ANN Indexes, and the Retrieval Layer for AI](content\u002Fhld\u002Fpart-4-data-systems\u002F08-vector-databases.md)\n10. [Key-Value Stores: Redis, Memcached, DynamoDB, and Picking the Right Hash Table](content\u002Fhld\u002Fpart-4-data-systems\u002F09-key-value-stores.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 5 — Architecture Patterns (11 chapters)\u003C\u002Fstrong> — monolith vs micro, event-driven, CQRS, ES, serverless, BFF, strangler, hex, multi-region, multi-tenant, CRDT apps\u003C\u002Fsummary>\n\n### Part 5 — Architecture Patterns (11 chapters)\n\n> **Audience:** engineers making architecture-level decisions or leading service migrations.\n> **Difficulty:** Intermediate. **Total reading time:** ~8 hours.\n\nThe architectural shapes you choose between when you design anything bigger than a single service: monolith vs microservices, event-driven, CQRS, event sourcing, serverless, BFF, strangler fig, hexagonal\u002Fclean, multi-region, multi-tenancy, CRDT-based apps.\n\n1. [Monolith vs Microservices: Team Topology, Conway's Law, and the Distributed System Tax](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F00-monolith-vs-microservices.md)\n2. [Event-Driven Architecture: Notifications, State Transfer, and Choreography](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F01-event-driven-architecture.md)\n3. [CQRS: Separating Reads from Writes Without Losing Your Mind](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F02-cqrs.md)\n4. [Event Sourcing: Events as the Source of Truth](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F03-event-sourcing.md)\n5. [Serverless: Functions, Cold Starts, and When FaaS Actually Saves Money](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F04-serverless.md)\n6. [Backend for Frontend: Per-Client API Aggregation Done Right](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F05-backend-for-frontend.md)\n7. [Strangler Fig: Incremental Migration Without a Big Bang](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F06-strangler-fig.md)\n8. [Hexagonal and Clean Architecture: Keeping Business Logic Independent](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F07-hexagonal-clean-architecture.md)\n9. [Multi-Region Architecture: Active-Passive, Active-Active, and CRDTs](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F08-multi-region-architecture.md)\n10. [Multi-Tenancy: Silo, Pool, and the SaaS Isolation Spectrum](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F09-multi-tenancy.md)\n11. [CRDT Applications (Yjs, Automerge, Local-First Software)](content\u002Fhld\u002Fpart-5-architecture-patterns\u002F10-crdt-applications.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 6 — Reliability & Operations (11 chapters)\u003C\u002Fstrong> — observability, SLOs, resilience, scaling, deploys, chaos, incidents, FinOps, platform\u003C\u002Fsummary>\n\n### Part 6 — Reliability & Operations (11 chapters)\n\n> **Audience:** anyone on-call, anyone who signs SLAs, anyone paying a cloud bill.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~8 hours.\n\nThe engineering that separates \"it compiles\" from \"it runs reliably at 3 a.m. on a long weekend\": observability, SLOs, resilience patterns, auto-scaling, deployments, chaos engineering, incident response, health checks, FinOps, platform engineering.\n\n1. [Observability: Metrics, Logs, Traces, and the OpenTelemetry Standard](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F00-observability.md)\n2. [SLI, SLO, SLA, and Error Budgets: Making Reliability Quantitative](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F01-sli-slo-sla-error-budgets.md)\n3. [Resilience Patterns: Timeouts, Retries, Circuit Breakers, and Bulkheads](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F02-resilience-patterns.md)\n4. [Graceful Degradation: When Partial Service Beats No Service](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F03-graceful-degradation.md)\n5. [Auto-Scaling and Capacity Planning: From HPA to Predictive Scaling](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F04-auto-scaling-capacity.md)\n6. [Deployment Strategies: Blue-Green, Canary, Rolling, and Feature Flags](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F05-deployment-strategies.md)\n7. [Chaos Engineering: Breaking Things on Purpose](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F06-chaos-engineering.md)\n8. [Incident Management: From Detection to Blameless Postmortem](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F07-incident-management.md)\n9. [Health Checks and Readiness: Telling the Truth About Whether You're Up](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F08-health-checks-readiness.md)\n10. [Cost Optimization and FinOps](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F09-cost-optimization-finops.md)\n11. [Platform Engineering: IDPs, Golden Paths, and DX](content\u002Fhld\u002Fpart-6-reliability-and-operations\u002F10-platform-engineering.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 7 — Security at Scale (10 chapters)\u003C\u002Fstrong> — AuthN\u002FZ, OAuth\u002FOIDC, JWT, mTLS, secrets, DDoS\u002FWAF, compliance, supply chain, privacy, PQC\u003C\u002Fsummary>\n\n### Part 7 — Security at Scale (10 chapters)\n\n> **Audience:** Senior\u002FStaff engineers, platform teams, security-adjacent builders.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~7 hours.\n\nSecurity architecture for real systems, not a CISSP crib sheet: AuthN vs AuthZ, OAuth2\u002FOIDC, JWT (and why you probably shouldn't), mTLS, secrets management, DDoS\u002FWAF, compliance (GDPR\u002FDPDP\u002FCCPA), software supply chain, privacy-preserving systems, post-quantum cryptography.\n\n1. [Authentication vs Authorization: Identity, Permissions, and Access Models](content\u002Fhld\u002Fpart-7-security-at-scale\u002F00-authn-authz.md)\n2. [OAuth 2.0 and OpenID Connect: Delegated Authorization and Identity Done Right](content\u002Fhld\u002Fpart-7-security-at-scale\u002F01-oauth2-oidc.md)\n3. [JWT Deep Dive: Signed Tokens, Claims, and the Revocation Problem](content\u002Fhld\u002Fpart-7-security-at-scale\u002F02-jwt-deep-dive.md)\n4. [mTLS and Service-to-Service Authentication: SPIFFE, Service Mesh, and Zero Trust](content\u002Fhld\u002Fpart-7-security-at-scale\u002F03-mtls-service-auth.md)\n5. [Secrets Management: Vault, KMS, and the End of Secrets in Config Files](content\u002Fhld\u002Fpart-7-security-at-scale\u002F04-secrets-management.md)\n6. [DDoS Protection and WAFs: Mitigating Volumetric and Application Attacks](content\u002Fhld\u002Fpart-7-security-at-scale\u002F05-ddos-waf.md)\n7. [Data Residency and Compliance Architecture (GDPR, DPDP, CCPA, Right-to-Erasure)](content\u002Fhld\u002Fpart-7-security-at-scale\u002F06-data-residency-compliance.md)\n8. [Supply Chain Security: SBOM, SLSA, Sigstore, and Defending Against xz-utils](content\u002Fhld\u002Fpart-7-security-at-scale\u002F07-supply-chain-security.md)\n9. [Privacy-Preserving Systems (Differential Privacy, Federated Learning)](content\u002Fhld\u002Fpart-7-security-at-scale\u002F08-privacy-preserving-systems.md)\n10. [Post-Quantum Cryptography: Migrating to ML-KEM, ML-DSA, and a Crypto-Agile Future](content\u002Fhld\u002Fpart-7-security-at-scale\u002F09-post-quantum-crypto.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 8 — Case Studies (56 chapters)\u003C\u002Fstrong> — 56 end-to-end designs, grouped by theme; the centerpiece of interview prep\u003C\u002Fsummary>\n\n### Part 8 — Case Studies (56 chapters)\n\n> **Audience:** interview prep candidates, engineers building adjacent systems, anyone who learns best from worked examples.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~45 hours.\n\n56 end-to-end system designs, each following a consistent structure: requirements (functional + non-functional), back-of-envelope numbers, high-level architecture, data model, deep-dive components, scalability and reliability considerations, and real-world references. Grouped thematically below for easier navigation.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Core primitives (chapters 00-03)\u003C\u002Fstrong> — the four designs you see in every interview\u003C\u002Fsummary>\n\n1. [Design a URL Shortener (TinyURL \u002F bit.ly)](content\u002Fhld\u002Fpart-8-case-studies\u002F00-url-shortener.md)\n2. [Design a Pastebin (Paste Sharing Service)](content\u002Fhld\u002Fpart-8-case-studies\u002F01-pastebin.md)\n3. [Design a Distributed Rate Limiter](content\u002Fhld\u002Fpart-8-case-studies\u002F02-rate-limiter.md)\n4. [Design a Distributed Key-Value Store (Dynamo \u002F Cassandra \u002F Riak)](content\u002Fhld\u002Fpart-8-case-studies\u002F03-key-value-store.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Messaging & social (chapters 04-09)\u003C\u002Fstrong> — notifications, chat, feeds, photos, crawlers, autocomplete\u003C\u002Fsummary>\n\n1. [Design a Notification System (Push, SMS, Email at Scale)](content\u002Fhld\u002Fpart-8-case-studies\u002F04-notification-system.md)\n2. [Design a Chat System (WhatsApp \u002F Messenger \u002F Signal)](content\u002Fhld\u002Fpart-8-case-studies\u002F05-chat-system.md)\n3. [Design a Social Media Feed (Twitter \u002F Instagram \u002F LinkedIn)](content\u002Fhld\u002Fpart-8-case-studies\u002F06-social-media-feed.md)\n4. [Design a Photo Sharing Service (Instagram)](content\u002Fhld\u002Fpart-8-case-studies\u002F07-photo-sharing.md)\n5. [Design a Web Crawler (Googlebot-style)](content\u002Fhld\u002Fpart-8-case-studies\u002F08-web-crawler.md)\n6. [Design Search Autocomplete (Typeahead Suggestions)](content\u002Fhld\u002Fpart-8-case-studies\u002F09-search-autocomplete.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Media & consumer products (chapters 10-17)\u003C\u002Fstrong> — video, ride-hailing, maps, file sync, editing, cache, recommenders\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n1. [Design a Video Streaming Service (YouTube \u002F Twitch \u002F TikTok)](content\u002Fhld\u002Fpart-8-case-studies\u002F10-video-streaming.md)\n2. [Design Netflix (End-to-End)](content\u002Fhld\u002Fpart-8-case-studies\u002F11-netflix.md)\n3. [Design a Ride-Hailing Service (Uber \u002F Lyft)](content\u002Fhld\u002Fpart-8-case-studies\u002F12-ride-hailing.md)\n4. [Design Google Maps (Routing and Tile Rendering)](content\u002Fhld\u002Fpart-8-case-studies\u002F13-google-maps.md)\n5. [Design a File Sync Service (Dropbox \u002F Google Drive)](content\u002Fhld\u002Fpart-8-case-studies\u002F14-file-sync.md)\n6. [Design Collaborative Editing (Google Docs \u002F Figma \u002F Notion)](content\u002Fhld\u002Fpart-8-case-studies\u002F15-collaborative-editing.md)\n7. [Design a Distributed Cache (Memcached \u002F Redis Cluster)](content\u002Fhld\u002Fpart-8-case-studies\u002F16-distributed-cache.md)\n8. [Design a Recommendation System (Netflix \u002F YouTube \u002F TikTok)](content\u002Fhld\u002Fpart-8-case-studies\u002F17-recommendation-system.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Commerce & financial (chapters 18-21)\u003C\u002Fstrong> — ticketing, payments, stock exchange, food delivery\u003C\u002Fsummary>\n\n1. [Design a Ticketing System (BookMyShow \u002F Ticketmaster)](content\u002Fhld\u002Fpart-8-case-studies\u002F18-ticketing-system.md)\n2. [Design a Payment System (Stripe \u002F PayPal)](content\u002Fhld\u002Fpart-8-case-studies\u002F19-payment-system.md)\n3. [Design a Stock Exchange (Matching Engine)](content\u002Fhld\u002Fpart-8-case-studies\u002F20-stock-exchange.md)\n4. [Design a Food Delivery Service (DoorDash \u002F Swiggy)](content\u002Fhld\u002Fpart-8-case-studies\u002F21-food-delivery.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Data & infrastructure (chapters 22-29)\u003C\u002Fstrong> — metrics, ad-click, logs, proximity, leaderboards, IDs, hotels, schedulers\u003C\u002Fsummary>\n\n1. [Design a Metrics Pipeline (Prometheus \u002F InfluxDB \u002F Thanos)](content\u002Fhld\u002Fpart-8-case-studies\u002F22-metrics-pipeline.md)\n2. [Design Ad-Click Aggregation (Real-Time Stream Processing)](content\u002Fhld\u002Fpart-8-case-studies\u002F23-ad-click-aggregation.md)\n3. [Design a Logging Platform (ELK \u002F Loki \u002F Splunk)](content\u002Fhld\u002Fpart-8-case-studies\u002F24-logging-platform.md)\n4. [Design a Proximity Service (Nearby Friends \u002F Yelp)](content\u002Fhld\u002Fpart-8-case-studies\u002F25-proximity-service.md)\n5. [Design a Real-Time Leaderboard](content\u002Fhld\u002Fpart-8-case-studies\u002F26-leaderboard.md)\n6. [Design a Unique ID Generator (Snowflake, ULID, TSID, UUIDv7)](content\u002Fhld\u002Fpart-8-case-studies\u002F27-unique-id-generator.md)\n7. [Design a Hotel Reservation System (Booking.com \u002F Airbnb)](content\u002Fhld\u002Fpart-8-case-studies\u002F28-hotel-reservation.md)\n8. [Design a Distributed Job Scheduler (Airflow \u002F Temporal \u002F Distributed Cron)](content\u002Fhld\u002Fpart-8-case-studies\u002F29-job-scheduler.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>AI systems (chapters 30-37)\u003C\u002Fstrong> — ChatGPT, RAG, coding agents, AI search, voice, moderation, semantic cache, model routing\u003C\u002Fsummary>\n\n1. [Design ChatGPT (Conversational AI at Scale)](content\u002Fhld\u002Fpart-8-case-studies\u002F30-chatgpt-conversational-ai.md)\n2. [Design an Enterprise RAG System](content\u002Fhld\u002Fpart-8-case-studies\u002F31-enterprise-rag.md)\n3. [Design a Coding Agent (Claude Code \u002F GitHub Copilot \u002F Cursor)](content\u002Fhld\u002Fpart-8-case-studies\u002F32-coding-agent.md)\n4. [Design Perplexity (AI Search with Citations)](content\u002Fhld\u002Fpart-8-case-studies\u002F33-perplexity-ai-search.md)\n5. [Design a Voice Agent (Alexa \u002F Siri-Class Realtime)](content\u002Fhld\u002Fpart-8-case-studies\u002F34-voice-agent.md)\n6. [Design a Content Moderation System at Scale](content\u002Fhld\u002Fpart-8-case-studies\u002F35-content-moderation-at-scale.md)\n7. [Design a Semantic Cache for LLM Applications](content\u002Fhld\u002Fpart-8-case-studies\u002F36-semantic-cache.md)\n8. [Design a Model Router and Gateway (OpenRouter \u002F LiteLLM)](content\u002Fhld\u002Fpart-8-case-studies\u002F37-model-router-gateway.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Infra services (chapters 38-39)\u003C\u002Fstrong> — feature flags, DNS\u003C\u002Fsummary>\n\n1. [Design a Feature Flag Service (LaunchDarkly \u002F Harness FME \u002F Unleash)](content\u002Fhld\u002Fpart-8-case-studies\u002F38-feature-flag-service.md)\n2. [Design a DNS Service (Cloudflare 1.1.1.1 \u002F Google 8.8.8.8)](content\u002Fhld\u002Fpart-8-case-studies\u002F39-dns-service.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Consumer products II (chapters 40-49)\u003C\u002Fstrong> — dating, auctions, SaaS, video conf, email, live comments, fraud, fitness, online judge, price tracking\u003C\u002Fsummary>\n\n1. [Design a Dating App (Tinder \u002F Hinge \u002F Bumble)](content\u002Fhld\u002Fpart-8-case-studies\u002F40-dating-app.md)\n2. [Design an Online Auction (eBay \u002F Catawiki)](content\u002Fhld\u002Fpart-8-case-studies\u002F41-online-auction.md)\n3. [Design a Multi-Tenant SaaS Platform](content\u002Fhld\u002Fpart-8-case-studies\u002F42-multi-tenant-saas.md)\n4. [Design a Video Conferencing System (Zoom \u002F Google Meet)](content\u002Fhld\u002Fpart-8-case-studies\u002F43-video-conferencing.md)\n5. [Design an Email Service at Gmail Scale (1.8B Users, 300B Messages\u002FDay)](content\u002Fhld\u002Fpart-8-case-studies\u002F44-gmail-scale-email.md)\n6. [Design Live Comments at Scale (FB Live \u002F YouTube Live \u002F Twitch Chat)](content\u002Fhld\u002Fpart-8-case-studies\u002F45-live-comments.md)\n7. [Design a Fraud Detection System (Stripe Radar \u002F PayPal \u002F Feedzai)](content\u002Fhld\u002Fpart-8-case-studies\u002F46-fraud-detection.md)\n8. [Design a Fitness Tracking Service (Strava \u002F MapMyRun)](content\u002Fhld\u002Fpart-8-case-studies\u002F47-strava-fitness.md)\n9. [Design an Online Judge (LeetCode \u002F Codeforces \u002F HackerEarth)](content\u002Fhld\u002Fpart-8-case-studies\u002F48-online-judge.md)\n10. [Design a Price Tracking Service (CamelCamelCamel \u002F Honey \u002F Keepa)](content\u002Fhld\u002Fpart-8-case-studies\u002F49-price-tracking.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Developer & ops platforms (chapters 50-55)\u003C\u002Fstrong> — API gateway, CI\u002FCD, observability, search engine, brokerage, chat-at-scale\u003C\u002Fsummary>\n\n1. [Design an API Gateway at Scale (Kong \u002F AWS API Gateway \u002F Apigee \u002F Envoy)](content\u002Fhld\u002Fpart-8-case-studies\u002F50-api-gateway.md)\n2. [Design a CI\u002FCD Platform (GitHub Actions \u002F GitLab CI \u002F CircleCI)](content\u002Fhld\u002Fpart-8-case-studies\u002F51-cicd-platform.md)\n3. [Design an Observability Platform (Datadog \u002F New Relic \u002F Honeycomb)](content\u002Fhld\u002Fpart-8-case-studies\u002F52-observability-platform.md)\n4. [Design a Search Engine (Google-Scale \u002F Brave Search)](content\u002Fhld\u002Fpart-8-case-studies\u002F53-search-engine.md)\n5. [Design a Brokerage Platform (Robinhood \u002F E*TRADE \u002F Interactive Brokers)](content\u002Fhld\u002Fpart-8-case-studies\u002F54-brokerage-trading.md)\n6. [Design Channel-Scale Chat (Discord \u002F Slack)](content\u002Fhld\u002Fpart-8-case-studies\u002F55-channel-scale-chat.md)\n\n\u003C\u002Fdetails>\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 9 — AI & ML System Design (15 chapters)\u003C\u002Fstrong> — LLM serving, RAG, vector search, agents, LLMOps, safety, recommenders, multimodal\u003C\u002Fsummary>\n\n### Part 9 — AI & ML System Design (15 chapters)\n\n> **Audience:** anyone building with or around LLMs, agents, or production ML.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~11 hours.\n\nModern AI-systems architecture, treated with the same rigor as Part 3: LLM serving, RAG, vector search, agent architectures, multi-agent orchestration, LLM evaluation, LLMOps, cost optimization, safety, ML fundamentals, feature stores, recommenders, real-time AI, multimodal, and the data infra underneath all of it.\n\n1. [LLM Serving Architecture (vLLM, TGI, TensorRT-LLM)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F00-llm-serving-architecture.md)\n2. [RAG Pipelines (Retrieval-Augmented Generation)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F01-rag-pipelines.md)\n3. [Vector Search at Scale (HNSW, IVF-PQ, DiskANN)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F02-vector-search-at-scale.md)\n4. [AI Agent Architectures (ReAct, Reflection, Planning, Tool Use, Memory)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F03-ai-agent-architectures.md)\n5. [Multi-Agent Orchestration (LangGraph, OpenAI Agents SDK, AutoGen, Swarm)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F04-multi-agent-orchestration.md)\n6. [LLM Evaluation and Observability (Ragas, LangSmith, TruLens, LLM-as-Judge)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F05-llm-evaluation-observability.md)\n7. [LLMOps and Prompt Engineering (Versioning, Guardrails, Red-Teaming)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F06-llmops-prompt-engineering.md)\n8. [LLM Cost Optimisation (Semantic Cache, Model Routing, Cascading, Prompt Caching)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F07-llm-cost-optimization.md)\n9. [LLM Safety and Guardrails (OWASP LLM Top 10, Prompt Injection, PII, Jailbreaks)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F08-llm-safety-guardrails.md)\n10. [ML System Design Fundamentals](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F09-ml-system-design-fundamentals.md)\n11. [Feature Stores and Model Serving (Feast, Tecton, KServe, BentoML, MLflow)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F10-feature-stores-model-serving.md)\n12. [Recommendation Systems Deep Dive (DLRM, Two-Tower, Embedding Retrieval, Cold Start)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F11-recommendation-systems.md)\n13. [Realtime AI and Voice Agents (Streaming Inference, WebRTC, LiveKit, Deepgram)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F12-realtime-ai-voice-agents.md)\n14. [Multimodal AI Systems (CLIP, Whisper, LayoutLM, Document AI)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F13-multimodal-ai-systems.md)\n15. [Data Infrastructure for AI (Embedding Pipelines, Chunking, Unstructured ETL, MCP)](content\u002Fhld\u002Fpart-9-ai-ml-system-design\u002F14-data-infrastructure-for-ai.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 10 — Emerging Patterns (1 chapter)\u003C\u002Fstrong> — green\u002Fsustainable computing; growing list of forward-looking topics\u003C\u002Fsummary>\n\n### Part 10 — Emerging Patterns (1 chapter)\n\n> **Audience:** Staff+ engineers and architects thinking past 2026.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~45 minutes.\n\nForward-looking topics that are adjacent to everything else. Currently one chapter, with more planned (WebAssembly at the edge, unikernels, confidential computing, on-device AI).\n\n1. [Green Computing (Carbon-Aware Scheduling, PUE, Sustainable Systems)](content\u002Fhld\u002Fpart-10-emerging-patterns\u002F00-green-computing.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 11 — Interview Framework (6 chapters)\u003C\u002Fstrong> — RESHADED\u002FPEDALS\u002FADEPT, requirements, diagrams, trade-offs, company flavors, RFCs\u003C\u002Fsummary>\n\n### Part 11 — Interview Framework (6 chapters)\n\n> **Audience:** anyone preparing for or giving system-design interviews.\n> **Difficulty:** Intermediate. **Total reading time:** ~4 hours.\n\nHow to run a 45-minute system-design interview, from both sides of the whiteboard. Compares RESHADED \u002F PEDALS \u002F ADEPT frameworks, teaches requirements scoping, diagramming, trade-off articulation, company-specific flavors, and RFC\u002Fdesign-doc authoring for Staff-level work.\n\n1. [Interview Frameworks Compared (RESHADED, PEDALS, ADEPT)](content\u002Fhld\u002Fpart-11-interview-framework\u002F00-frameworks-compared.md)\n2. [Requirements Scoping: Functional, Non-Functional, and MoSCoW](content\u002Fhld\u002Fpart-11-interview-framework\u002F01-requirements-scoping.md)\n3. [Diagramming Skills for System Design Interviews](content\u002Fhld\u002Fpart-11-interview-framework\u002F02-diagramming-skills.md)\n4. [Trade-off Articulation: Saying 'It Depends' Well](content\u002Fhld\u002Fpart-11-interview-framework\u002F03-trade-off-articulation.md)\n5. [Company-Specific Interview Flavors (Amazon, Google, Meta, Netflix)](content\u002Fhld\u002Fpart-11-interview-framework\u002F04-company-specific-flavors.md)\n6. [Design Doc Authoring: RFCs, ADRs, and the Staff Engineer's Written Output](content\u002Fhld\u002Fpart-11-interview-framework\u002F05-design-doc-authoring.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Trade-offs Library (22 pages)\u003C\u002Fstrong> — the canonical \"X vs Y\" decision pages cross-referenced from every part\u003C\u002Fsummary>\n\n### Trade-offs Library (22 pages)\n\n> **Audience:** everyone — these pages are referenced from every other part.\n> **Difficulty:** Intermediate. **Total reading time:** ~8 hours.\n\nThe 22 most-asked architectural-choice questions, each answered in a dedicated decision-comparison page: flowchart, comparison table, \"when to pick A\" vs \"when to pick B\" sections, real-world examples, and citations.\n\n1. [Strong vs Eventual Consistency](content\u002Fhld\u002Ftrade-offs\u002F01-strong-vs-eventual-consistency.md)\n2. [ACID vs BASE](content\u002Fhld\u002Ftrade-offs\u002F02-acid-vs-base.md)\n3. [SQL vs NoSQL](content\u002Fhld\u002Ftrade-offs\u002F03-sql-vs-nosql.md)\n4. [Latency vs Throughput](content\u002Fhld\u002Ftrade-offs\u002F04-latency-vs-throughput.md)\n5. [CAP and PACELC Applied](content\u002Fhld\u002Ftrade-offs\u002F05-cap-and-pacelc.md)\n6. [Cache Strategies: Cache-Aside vs Write-Through vs Write-Behind](content\u002Fhld\u002Ftrade-offs\u002F06-cache-strategies.md)\n7. [Batch vs Stream Processing](content\u002Fhld\u002Ftrade-offs\u002F07-batch-vs-stream.md)\n8. [Load Balancer vs Reverse Proxy vs API Gateway](content\u002Fhld\u002Ftrade-offs\u002F08-load-balancer-vs-proxy-vs-gateway.md)\n9. [REST vs gRPC vs GraphQL](content\u002Fhld\u002Ftrade-offs\u002F09-rest-vs-grpc-vs-graphql.md)\n10. [Polling vs Long-Polling vs SSE vs WebSockets vs Webhooks](content\u002Fhld\u002Ftrade-offs\u002F10-polling-vs-websockets.md)\n11. [Rate Limiting Algorithms: Token Bucket vs Sliding Window](content\u002Fhld\u002Ftrade-offs\u002F11-rate-limiting-algorithms.md)\n12. [Optimistic vs Pessimistic Concurrency Control](content\u002Fhld\u002Ftrade-offs\u002F12-optimistic-vs-pessimistic-locking.md)\n13. [Partitioning Schemes: Range, Hash, Consistent Hash, Directory](content\u002Fhld\u002Ftrade-offs\u002F13-partitioning-schemes.md)\n14. [B-tree vs LSM-tree Storage](content\u002Fhld\u002Ftrade-offs\u002F14-btree-vs-lsm.md)\n15. [Monolith vs Microservices](content\u002Fhld\u002Ftrade-offs\u002F15-monolith-vs-microservices.md)\n16. [Replication Topologies: Leader-Follower, Multi-Leader, Leaderless](content\u002Fhld\u002Ftrade-offs\u002F16-replication-topologies.md)\n17. [Distributed Transactions: 2PC vs Saga vs TCC](content\u002Fhld\u002Ftrade-offs\u002F17-distributed-transactions.md)\n18. [Push vs Pull (Fan-out, Messaging, Feed)](content\u002Fhld\u002Ftrade-offs\u002F18-push-vs-pull.md)\n19. [Lambda vs Kappa Architecture](content\u002Fhld\u002Ftrade-offs\u002F19-lambda-vs-kappa.md)\n20. [Vertical vs Horizontal Scaling](content\u002Fhld\u002Ftrade-offs\u002F20-vertical-vs-horizontal-scaling.md)\n21. [Normalization vs Denormalization](content\u002Fhld\u002Ftrade-offs\u002F21-normalization-vs-denormalization.md)\n22. [Single-Region vs Multi-Region Deployment](content\u002Fhld\u002Ftrade-offs\u002F22-single-vs-multi-region.md)\n\n\u003C\u002Fdetails>\n\n---\n\n## The full DSA curriculum\n\n**120 chapters across 15 parts, plus 37 pattern decision pages, 5 long-form editorials, and 46 interactive widget specs.** Each chapter is centered on a specific data structure or algorithmic pattern, taught with worked LeetCode problems. Sibling `sol.py` \u002F `sol.java` \u002F `sol.cpp` \u002F `sol.go` files live under each problem directory; the Python solution is inlined in the chapter, the others are linked. Editorials, pattern decision diagrams, and widget YAML specs are siblings under `content\u002Fdsa\u002F`.\n\nEach part below is collapsed by default — click to expand the chapter list. Linking to a specific part from elsewhere in the README auto-expands it on GitHub.\n\n| # | Part | Chapters | Difficulty | Reading time |\n|---|------|---------:|------------|-------------:|\n| 0 | [Foundations](#part-0--foundations-7-chapters) | 7 | Beginner | ~3 hrs |\n| 1 | [Linear Data Structures](#part-1--linear-data-structures-8-chapters) | 8 | Beginner | ~5 hrs |\n| 2 | [Search & Sort](#part-2--search--sort-8-chapters) | 8 | Beginner-Intermediate | ~5 hrs |\n| 3 | [Two Pointers, Sliding Window, Prefix Sums](#part-3--two-pointers-sliding-window-prefix-sums-6-chapters) | 6 | Intermediate | ~4 hrs |\n| 4 | [Stack & Queue Patterns](#part-4--stack--queue-patterns-5-chapters) | 5 | Intermediate | ~3 hrs |\n| 5 | [Linked Lists](#part-5--linked-lists-6-chapters) | 6 | Intermediate | ~4 hrs |\n| 6 | [Trees & Heaps](#part-6--trees--heaps-11-chapters) | 11 | Intermediate-Advanced | ~7 hrs |\n| 7 | [Recursion & Backtracking](#part-7--recursion--backtracking-7-chapters) | 7 | Intermediate-Advanced | ~5 hrs |\n| 8 | [Graphs](#part-8--graphs-13-chapters) | 13 | Intermediate-Advanced | ~9 hrs |\n| 9 | [Dynamic Programming](#part-9--dynamic-programming-15-chapters) | 15 | Advanced | ~10 hrs |\n| 10 | [Greedy](#part-10--greedy-5-chapters) | 5 | Intermediate-Advanced | ~3 hrs |\n| 11 | [Bit Manipulation](#part-11--bit-manipulation-4-chapters) | 4 | Intermediate | ~2 hrs |\n| 12 | [Strings & Pattern Matching](#part-12--strings--pattern-matching-6-chapters) | 6 | Intermediate-Advanced | ~4 hrs |\n| 13 | [Design the Data Structure](#part-13--design-the-data-structure-7-chapters) | 7 | Intermediate-Advanced | ~5 hrs |\n| 14 | [Interview Framework](#part-14--interview-framework-12-chapters) | 12 | All levels | ~5 hrs |\n| P | [Pattern decision pages](#dsa-pattern-decision-pages-37-pages) | 37 | Intermediate | ~10 hrs |\n| E | [Long-form editorials](#dsa-long-form-editorials-5-pages) | 5 | Intermediate | ~2 hrs |\n| W | [Interactive widget specs](#dsa-interactive-widget-specs-46-yaml-files) | 46 | — | reference |\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 0 — Foundations (7 chapters)\u003C\u002Fstrong> — Big-O, recursion, bit ops, interview math, language idioms, choosing your language\u003C\u002Fsummary>\n\n### Part 0 — Foundations (7 chapters)\n\n> **Audience:** anyone starting interview prep, or returning after a long pause.\n> **Difficulty:** Beginner. **Total reading time:** ~3 hours.\n\nThe mental models and language fluency that everything else assumes. Big-O, the recursion mental model, bit-manipulation primer, the math you actually need for interviews, language idioms across Python \u002F Java \u002F C++ \u002F Go, and how to pick which language to interview in.\n\n1. [How to use this handbook](content\u002Fdsa\u002Fpart-0-foundations\u002F00-how-to-use.md)\n2. [Computational complexity and Big-O](content\u002Fdsa\u002Fpart-0-foundations\u002F01-complexity-big-o.md)\n3. [The recursion mental model](content\u002Fdsa\u002Fpart-0-foundations\u002F02-recursion-mental-model.md)\n4. [Bit manipulation primer](content\u002Fdsa\u002Fpart-0-foundations\u002F03-bit-manipulation-primer.md)\n5. [Math for interviews](content\u002Fdsa\u002Fpart-0-foundations\u002F04-math-for-interviews.md)\n6. [Language idioms across Python, Java, C++, Go](content\u002Fdsa\u002Fpart-0-foundations\u002F05-language-idioms.md)\n7. [Choosing your interview language](content\u002Fdsa\u002Fpart-0-foundations\u002F06-choosing-your-language.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 1 — Linear Data Structures (8 chapters)\u003C\u002Fstrong> — arrays, dynamic-array internals, strings, hash maps, stacks, queues, matrices\u003C\u002Fsummary>\n\n### Part 1 — Linear Data Structures (8 chapters)\n\n> **Audience:** everyone — these are the structures that show up in 70% of all interview problems.\n> **Difficulty:** Beginner. **Total reading time:** ~5 hours.\n\nThe contiguous-memory and bucket-based data structures: arrays (static \u002F dynamic \u002F multi-dimensional), the amortized-O(1) doubling rule that makes a `vector` work, strings as encoded byte arrays, hash maps and hash sets, the load-factor \u002F collision math behind them, stacks and queues with the call-stack analogy, and matrix manipulation tricks (rotate-in-place, spiral, transpose).\n\n1. [Arrays: static, dynamic, multi-dimensional](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F00-arrays.md)\n2. [Dynamic array internals](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F01-dynamic-array-internals.md)\n3. [Strings: encoding, immutability, builders](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F02-strings.md)\n4. [Hash maps and hash sets](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F03-hash-maps.md)\n5. [Hash collisions and the load factor](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F04-hash-collisions.md)\n6. [Stacks and the call stack analogy](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F05-stacks.md)\n7. [Queues, deques, and circular buffers](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F06-queues-deques.md)\n8. [Matrix manipulation](content\u002Fdsa\u002Fpart-1-linear-data-structures\u002F07-matrix-manipulation.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 2 — Search & Sort (8 chapters)\u003C\u002Fstrong> — linear\u002Fbinary search, comparison & linear-time sorts, heap sort, quickselect\u003C\u002Fsummary>\n\n### Part 2 — Search & Sort (8 chapters)\n\n> **Audience:** every interviewee — binary search alone shows up in roughly a quarter of all problems.\n> **Difficulty:** Beginner-Intermediate. **Total reading time:** ~5 hours.\n\nHow to find things and how to order things. Linear search and when it's actually the right answer; the canonical binary search written without off-by-one bugs; the lower_bound \u002F upper_bound \u002F peak \u002F rotated-array variants; the comparison-sort family (insertion, merge, quicksort with the production hybrids like Timsort and Introsort); heap sort and why `n log n` is the comparison-sort lower bound; the linear-time sorts (counting, radix, bucket); and quickselect for the top-k problems.\n\n1. [Linear search and what it's good for](content\u002Fdsa\u002Fpart-2-search-sort\u002F00-linear-search.md)\n2. [Binary search: the canonical version](content\u002Fdsa\u002Fpart-2-search-sort\u002F01-binary-search-canonical.md)\n3. [Binary search variants: lower_bound, upper_bound, peaks, and rotated arrays](content\u002Fdsa\u002Fpart-2-search-sort\u002F02-binary-search-variants.md)\n4. [Comparison sorts I: insertion sort and merge sort](content\u002Fdsa\u002Fpart-2-search-sort\u002F03-comparison-sorts-1.md)\n5. [Comparison sorts II: quicksort, partition, and the production hybrids](content\u002Fdsa\u002Fpart-2-search-sort\u002F04-comparison-sorts-2.md)\n6. [Heap sort and the n log n lower bound](content\u002Fdsa\u002Fpart-2-search-sort\u002F05-heap-sort.md)\n7. [Linear-time sorts: counting, radix, bucket](content\u002Fdsa\u002Fpart-2-search-sort\u002F06-linear-sorts.md)\n8. [Quickselect: linear-time selection](content\u002Fdsa\u002Fpart-2-search-sort\u002F07-quickselect.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 3 — Two Pointers, Sliding Window, Prefix Sums (6 chapters)\u003C\u002Fstrong> — the array-walking patterns that turn O(n²) into O(n)\u003C\u002Fsummary>\n\n### Part 3 — Two Pointers, Sliding Window, Prefix Sums (6 chapters)\n\n> **Audience:** anyone whose nested-loop solutions keep timing out.\n> **Difficulty:** Intermediate. **Total reading time:** ~4 hours.\n\nThree closely related patterns that all amount to \"walk the array smarter\": opposite-ends two pointers (Container With Most Water, 3Sum), same-direction two pointers, fixed and variable sliding windows, prefix sums and difference arrays, and the prefix-sum + hash-map combo for \"subarray sum equals K\"-shaped problems.\n\n1. [Two pointers: opposite ends](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F00-two-pointers-opposite.md)\n2. [Two pointers: same direction](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F01-two-pointers-same-direction.md)\n3. [Sliding window: fixed size](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F02-sliding-window-fixed.md)\n4. [Sliding window: variable size](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F03-sliding-window-variable.md)\n5. [Prefix sums and difference arrays](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F04-prefix-sums.md)\n6. [The prefix-sum + hash-map combo](content\u002Fdsa\u002Fpart-3-pointers-window-prefix\u002F05-prefix-sum-hash.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 4 — Stack & Queue Patterns (5 chapters)\u003C\u002Fstrong> — monotonic stack\u002Fdeque, min\u002Fmax stack, expression parsing, queue-from-stacks\u003C\u002Fsummary>\n\n### Part 4 — Stack & Queue Patterns (5 chapters)\n\n> **Audience:** anyone struggling with Next-Greater-Element and sliding-window-maximum problems.\n> **Difficulty:** Intermediate. **Total reading time:** ~3 hours.\n\nStack and queue *as algorithmic patterns*, not just data structures. Monotonic stacks (Daily Temperatures, Largest Rectangle in Histogram), monotonic deques (Sliding Window Maximum), min\u002Fmax stacks (O(1) min query under push\u002Fpop), expression parsing (Shunting-Yard \u002F RPN), and the queue-from-stacks amortization argument.\n\n1. [Monotonic stack](content\u002Fdsa\u002Fpart-4-stack-queue-patterns\u002F00-monotonic-stack.md)\n2. [Monotonic deque](content\u002Fdsa\u002Fpart-4-stack-queue-patterns\u002F01-monotonic-deque.md)\n3. [Min and max stacks](content\u002Fdsa\u002Fpart-4-stack-queue-patterns\u002F02-min-max-stack.md)\n4. [Expression evaluation and parsing](content\u002Fdsa\u002Fpart-4-stack-queue-patterns\u002F03-expression-evaluation.md)\n5. [Queue from stacks](content\u002Fdsa\u002Fpart-4-stack-queue-patterns\u002F04-queue-from-stacks.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 5 — Linked Lists (6 chapters)\u003C\u002Fstrong> — pointer rewiring, reversal, k-group reversal, Floyd's cycle, merging, LRU cache\u003C\u002Fsummary>\n\n### Part 5 — Linked Lists (6 chapters)\n\n> **Audience:** anyone who's drawn boxes-and-arrows on a whiteboard and gotten lost.\n> **Difficulty:** Intermediate. **Total reading time:** ~4 hours.\n\nLinked lists are pointer surgery. Sentinel-node patterns, the canonical iterative reversal (and the recursive cousin), reverse-in-groups-of-k, Floyd's tortoise-and-hare cycle detection (and why the cycle-start formula works), merging sorted lists, and the LRU cache as the canonical hash-map + doubly-linked-list combo.\n\n1. [Linked list fundamentals: sentinels, pointer rewiring, doubly-linked design](content\u002Fdsa\u002Fpart-5-linked-lists\u002F00-linked-list-fundamentals.md)\n2. [Reversal patterns](content\u002Fdsa\u002Fpart-5-linked-lists\u002F01-reversal-patterns.md)\n3. [Reverse in groups of k](content\u002Fdsa\u002Fpart-5-linked-lists\u002F02-reverse-in-groups-k.md)\n4. [Cycle detection (Floyd's tortoise and hare)](content\u002Fdsa\u002Fpart-5-linked-lists\u002F03-cycle-detection.md)\n5. [Merging linked lists](content\u002Fdsa\u002Fpart-5-linked-lists\u002F04-merging-linked-lists.md)\n6. [LRU cache: hash map plus doubly linked list](content\u002Fdsa\u002Fpart-5-linked-lists\u002F05-lru-cache.md)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Part 6 — Trees & Heaps (11 chapters)\u003C\u002Fstrong> — traversals, Morris, BFS, heaps, BST, AVL\u002FRB, tries, tree DP, segment trees\u003C\u002Fsummary>\n\n### Part 6 — Trees & Heaps (11 chapters)\n\n> **Audience:** anyone past the linear-data-structure phase of prep.\n> **Difficulty:** Intermediate-Advanced. **Total reading time:** ~7 hours.\n\nThe hierarchical structures and the priority queue. Binary tree fundamentals, the three depth-first traversals (pre\u002Fin\u002Fpost — both recursive and iterative), Morris traversal for O(1) space, level-order BFS, heaps and priority queues (heapify in O(n)), binary search trees, AVL rotations, a red-black overview, tries, the tree-DP primer (post-order with side state), and an introduction to segment trees for range queries.\n\n1. [Binary tree fundamentals](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F00-binary-tree-fundamentals.md)\n2. [Tree traversals: pre, in, post](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F01-tree-traversals.md)\n3. [Morris traversal: O(1)-space inorder by threading](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F02-morris-traversal.md)\n4. [Level-order traversal: BFS on trees](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F03-level-order-traversal.md)\n5. [Heaps and priority queues](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F04-heaps-priority-queues.md)\n6. [Binary search trees](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F05-binary-search-trees.md)\n7. [AVL trees and rotations](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F06-avl-rotations.md)\n8. [Red-black trees: an overview](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F07-red-black-overview.md)\n9. [Tries](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F08-tries.md)\n10. [Tree DP primer: post-order with side state](content\u002Fdsa\u002Fpart-6-trees-heaps\u002F09-tree-dp.md)\n11. [Segment trees](content","该项目是一个开源的高级系统设计和数据结构与算法手册。核心功能包括159章关于高级软件设计、分布式系统和现代基础设施的内容，以及120章涵盖15个部分的数据结构与算法教程。技术特点为使用Mermaid图解、引用超过3,100次，并提供多种编程语言（Python\u002FJava\u002FC++\u002FGo）的LeetCode问题解决方案。适用于计算机科学学生、软件工程师及希望提升技术能力的专业人士在自学或教学场景中使用。",2,"2026-06-11 04:07:51","CREATED_QUERY"]