Data Structures & Algorithms
If this were a book, this page is the table of contents. Each Part below is a chapter; each chapter links out to the concepts, designs, and platform notes that already exist elsewhere in this wiki instead of duplicating them. Unwritten chapters are listed as Planned rows, not empty files.
Parts
00 — Python Language Foundations
The language mechanics this entire book assumes fluency in before Part 01 even starts — automatic, no-look-up recall of how lists, dicts, comprehensions, and generators actually behave, so that later Parts can spend their attention on algorithmic reasoning instead of syntax.
- 1 — Pattern Practice & Loops
- 2 — Built-in Functions
- 3 — Strings
- 4 — Lists
- 5 — Tuples
- 6 — Dictionaries
- 7 — Sets
- 8 — Collections Module
- 9 — heapq & bisect
- 10 — Math & Random
- 11 — itertools & functools
- 12 — Python Algorithm Idioms
- 13 — Control Flow
- 14 — Functions
- 15 — Classes & OOP
- 16 — Error Handling
- 17 — Comprehensions
- 18 — Generators
01 — Mathematical & Algorithmic Foundations
The shared vocabulary every later Part assumes: what makes a solution an algorithm at all, how to measure its cost, how recursion actually executes, the discrete-math toolkit interview problems lean on, and the five design paradigms that recur across the whole book.
- 1 — What is an Algorithm?
- 2 — Asymptotic Analysis
- 3 — Recursion
- 4 — Mathematical Foundations
- 5 — Algorithm Design Principles
02 — Arrays & Strings
The highest-frequency interview surface — arrays, strings, and the traversal techniques (two pointers, sliding window, prefix sums, hashing) that turn brute-force scans into linear-time solutions.
- 1 — Arrays
- 2 — Array Algorithms
- 3 — Two Pointers
- 4 — Sliding Window
- 5 — Prefix Sum & Difference Arrays
- 6 — Hashing
- 7 — Strings
- 8 — String Algorithms
03 — Linked Data Structures
Pointer-based structures where the core skill is manipulating links without losing a reference — most bugs here are dangling pointers, not algorithmic mistakes.
- 1 — Singly Linked List
- 2 — Doubly Linked List
- 3 — Circular Linked List
- 4 — Skip Lists
- 5 — LRU Cache Design
04 — Stack, Queue & Deque
LIFO and FIFO structures, plus the monotonic variants that turn a naive O(n²) next-greater-element scan into O(n).
- 1 — Stack
- 2 — Queue
- 3 — Circular Queue
- 4 — Deque
- 5 — Monotonic Stack
- 6 — Monotonic Queue
- 7 — Expression Evaluation
05 — Trees
Hierarchical structures where traversal order — DFS variants vs. BFS — is the recurring decision point, plus the self-balancing and specialized trees that keep operations at O(log n).
- 1 — Tree Fundamentals
- 2 — Binary Trees
- 3 — Binary Search Trees
- 4 — AVL Trees
- 5 — Red-Black Trees
- 6 — Segment Trees
- 7 — Fenwick Trees (BIT)
- 8 — Interval Trees
- 9 — Trie
- 10 — Suffix Trie
- 11 — Heap
- 12 — Priority Queue
06 — Graphs
Traversal generalizes directly from trees, with one addition: a graph can have cycles, so every algorithm here tracks visited state. This Part covers representation, traversal, ordering, shortest paths, connectivity, and flow.
- 1 — Graph Representation
- 2 — Graph Traversal
- 3 — Topological Sorting
- 4 — Shortest Path
- 5 — Minimum Spanning Tree
- 6 — Union Find (Disjoint Set)
- 7 — Strongly Connected Components
- 8 — Bridges & Articulation Points
- 9 — Eulerian & Hamiltonian Paths
- 10 — Network Flow
07 — Sorting & Searching
Binary search and its ‘search on the answer’ generalization, plus the comparison-based and non-comparison sorting algorithms and their tradeoffs, and the selection algorithms that beat full sorting when only an order statistic is needed.
- 1 — Binary Search
- 2 — Binary Search on Answer
- 3 — Sorting Fundamentals
- 4 — Quick Sort
- 5 — Merge Sort
- 6 — Heap Sort
- 7 — Counting Sort
- 8 — Radix Sort
- 9 — Bucket Sort
- 10 — Selection Algorithms — (stub)
08 — Dynamic Programming
The single highest-leverage pattern in MAANG interviews — recognizing overlapping subproblems and optimal substructure, then choosing top-down memoization or bottom-up tabulation, across the recurring problem shapes: knapsack, LIS/LCS, interval, digit, and bitmask DP.
- 1 — DP Fundamentals
- 2 — Memoization
- 3 — Tabulation
- 4 — Knapsack Problems
- 5 — Longest Increasing Subsequence
- 6 — Longest Common Subsequence
- 7 — Edit Distance
- 8 — Matrix Chain Multiplication
- 9 — Digit DP
- 10 — Bitmask DP
- 11 — Tree DP
- 12 — Interval DP
09 — Greedy Algorithms
Problems where a locally optimal choice at each step provably leads to a globally optimal solution — the hard part is proving the greedy-choice property holds before trusting it.
- 1 — Greedy Strategy
- 2 — Interval Scheduling
- 3 — Huffman Coding
- 4 — Activity Selection
- 5 — Fractional Knapsack
10 — Backtracking & Search
Exhaustive search with pruning — building a solution incrementally and abandoning a branch the moment it can’t lead anywhere, across the canonical constraint-satisfaction and enumeration problems.
- 1 — Backtracking — (stub)
- 2 — N Queens — (stub)
- 3 — Sudoku Solver — (stub)
- 4 — Permutations — (stub)
- 5 — Combinations — (stub)
- 6 — Branch & Bound — (stub)
11 — Bit Manipulation
Low-level bitwise operations and the tricks built on them — a small, high-signal toolkit that turns a handful of interview problems from O(n) space into O(1).
12 — Advanced Data Structures
Specialized structures that show up less often but signal depth when they’re the right tool — from static range-query structures to the probabilistic sketches behind large-scale systems.
- 1 — Sparse Table — (stub)
- 2 — Treap — (stub)
- 3 — Rope — (stub)
- 4 — B-Tree — (stub)
- 5 — B+ Tree — (stub)
- 6 — Bloom Filter — (stub)
- 7 — Count-Min Sketch — (stub)
- 8 — HyperLogLog — (stub)
13 — Advanced Algorithms
Techniques past the standard interview loop but common at the L6+ bar or in specialized domains — optimized divide-and-conquer, computational geometry, advanced string matching, and algorithms over algebraic structures.
- 1 — Divide & Conquer Optimization — (stub)
- 2 — Convex Hull — (stub)
- 3 — Sweep Line — (stub)
- 4 — Computational Geometry — (stub)
- 5 — String Matching Advanced — (stub)
- 6 — FFT — (stub)
- 7 — Matrix Exponentiation — (stub)
- 8 — Fast Exponentiation — (stub)
- 9 — Randomized Algorithms — (stub)
14 — Interview Problem Patterns
The pattern-recognition layer that sits on top of every data structure and algorithm above — eighteen recurring problem shapes that, once recognized, turn an unfamiliar prompt into a known template. See Fan-Out/Fan-In for a production-grade, fully-worked example of the K-way Merge pattern (Ch. 8) applied to real distributed aggregation.
- 1 — Two Pointers Pattern — (stub)
- 2 — Sliding Window Pattern — (stub)
- 3 — Fast & Slow Pointer — (stub)
- 4 — Binary Search Pattern — (stub)
- 5 — Merge Intervals — (stub)
- 6 — Cyclic Sort — (stub)
- 7 — Top K Elements — (stub)
- 8 — K-way Merge — (stub)
- 9 — DFS Pattern — (stub)
- 10 — BFS Pattern — (stub)
- 11 — Tree DFS Pattern — (stub)
- 12 — Graph Pattern — (stub)
- 13 — Dynamic Programming Pattern — (stub)
- 14 — Monotonic Stack Pattern — (stub)
- 15 — Union Find Pattern — (stub)
- 16 — Prefix Sum Pattern — (stub)
- 17 — Heap Pattern — (stub)
- 18 — Trie Pattern — (stub)
15 — MAANG Interview Mastery
The meta-layer above data structures and patterns — how to perform under interview conditions: communicating while you think, recognizing which of the preceding 138 chapters applies, and converting practice into a repeatable, revisable system before interview day.
- 1 — Complexity Analysis in Interviews — (stub)
- 2 — Choosing the Right Data Structure — (stub)
- 3 — Whiteboard Communication — (stub)
- 4 — Problem-Solving Framework — (stub)
- 5 — Optimization Techniques — (stub)
- 6 — Handling Follow-up Questions — (stub)
- 7 — Recognizing Hidden Patterns — (stub)
- 8 — Mock Interview Walkthroughs — (stub)
- 9 — Top 200 MAANG Problems Roadmap — (stub)
- 10 — Revision Strategy & Cheat Sheets — (stub)
Metadata
| Author | Amit Singh |
| Scope | data-structures-algorithms |
Local graph
Linked from 4 notes
Notes — Library Index
The front page of the notebook — every book-shaped domain, the applied Projects and flat Inbox folders, and how they cross-link into one wiki instead of duplicating content across each other.
Permutations, Combinations & Probability
Counting principles, arrangement vs. selection, and basic probability for exam-speed solving.
Aptitude
A book-shaped table of contents for aptitude test prep: quantitative aptitude, logical reasoning, verbal ability, and mock-test strategy for the aptitude rounds that still gate MAANG-adjacent hiring pipelines.
Productivity for Knowledge Workers
A book-shaped table of contents for productivity as practiced by a knowledge worker: foundations, self-management, goal setting, time and deep work, personal knowledge management, learning, task systems, decision making, habits, digital productivity, engineering and career practice, health, review, and an advanced operating-system layer, plus reference appendices — cross-linking existing notes instead of duplicating them.
Related notes
Observability Engineering
A book-shaped table of contents for observability engineering: foundations through architecture, metrics, logging, tracing, profiling, OpenTelemetry, instrumentation, Kubernetes/cloud, data platforms, visualization, alerting, SRE integration, cost, security, platform engineering, AI-driven operations, and MAANG interview preparation — cross-linking existing prometheus/grafana-cloud/kubernetes/sre/platform-engineering notes instead of duplicating them.
Kubernetes
A book-shaped table of contents for Kubernetes: cloud-native foundations, the CKAD/CKA/CKS certification tracks, control-plane internals, platform tooling, multi-cluster architecture, and MAANG-level system design and interview prep — cross-linking the existing Prometheus, Observability, and Platform Engineering chapters instead of duplicating them.
Site Reliability Engineering: From Foundations to Internet-Scale Systems
The complete 184-chapter, 15-part Site Reliability Engineering curriculum — from Linux internals and distributed-systems theory through reliability engineering, observability, incident response, platform engineering, and Staff/Principal-level MAANG interview preparation, ordered the way SRE expertise actually develops rather than as a topic index.
Aptitude
A book-shaped table of contents for aptitude test prep: quantitative aptitude, logical reasoning, verbal ability, and mock-test strategy for the aptitude rounds that still gate MAANG-adjacent hiring pipelines.