Advanced Data Structures & Amortized Analysis
Build structures whose correctness survives long operation sequences, and explain the exact guarantee each offers. This module connects balanced maps, connectivity, meldable queues, amortization, range queries, persistence and probabilistic membership to ownership and resource contracts. Completion depends on evidence, not a speed challenge or a claim to an elite percentile.
Entry and outcomes
Complete the prerequisite diagnostic. You should already reason about recursion, induction, asymptotic costs, basic maps/heaps, graphs and probability. Use its repair routes for gaps. Then read the operation and resource contracts.
By completion, maintain ordering/balance/metadata through mutation; distinguish worst-case, amortized and expected bounds; model destructive ownership; compose range updates in order; preserve branching versions; and use approximate membership only with a correct exact-store lifecycle.
Learning route and workload
Plan 95–135 hours across lessons/reading (33–45), labs (26–38), practice (20–28), assessment/remediation (8–12) and capstone (8–12). These are author estimates pending pilots, excluding depth options and full-book reading.
- Complete lessons 1–7, using earlier graph work to separate connectivity from paths.
- Study amortization lessons 11–14, then heaps 8–10; numerical proofs support the heap analysis.
- Finish randomization, range queries, persistence and representation in lessons 15–19.
- Interleave worked examples, five guided labs and independent practice. Attempt before consulting the separate keys.
- Take the independent assessment, satisfy every competency gate, and complete the capstone.
Core implementation: AVL map, DSU, binomial heap, doubling array, Fenwick tree, lazy sum tree, persistent sum tree and Bloom filter. Full implementations of the other structures are explicit depth options; their invariants and guarantee comparisons remain core conceptual work.
Concept lessons
- Binary Search Trees and the BST Property
- Red-Black Trees: Invariants, Rotations, and O(log n) Guarantees
- AVL Trees and the Height-Balanced Alternative
- Skip Lists as a Randomized Balanced-BST Replacement
- The Union-Find Problem and the Naive Representation
- Union by Rank and Path Compression: Near-alpha(n) Amortized
- Applications: Kruskal MST, Dynamic Connectivity, Equivalence Classes
- Binomial Heaps: Structure and Merge
- Fibonacci Heaps: Amortized Bounds That Make Dijkstra Faster
- Pairing Heaps and the Engineering-vs-Theory Tradeoff
- Why Amortized Analysis: Smoothing Worst-Case Spikes
- Aggregate Method and the Dynamic Array
- Accounting Method: Credits Stored on Operations
- Potential Method and Formal Amortized Cost Accounting
- Randomized Data Structures: Skip Lists, Treaps, Randomized BSTs
- Bloom Filters: Probabilistic Set Membership
- Segment Trees and Fenwick Trees for Range Queries
- Persistent Data Structures and Functional Spines
- Succinct and Cache-Oblivious Structures (Research-Level Intro)
Reading, repair and review
Use the reading guide for bounded assignments drawn from Books, reading and Resources. Use selective reading to resolve a specific question; the full-book path has its own separate schedule. Consult resources and the reference index for specific questions. Repair failures with the mistake clinic, then try case studies with changed assumptions. The instructor guide records scope, scoring and pending human validation.