Skip to content

Vol 2: Data Structures and Algorithms ​

Arrays, hash tables, and trees suit different operations. This volume uses invariants to check correctness and complexity to compare costs. With ten elements, almost everything looks fast; add a few zeros and the differences become harder to miss.

Prerequisites ​

  • Be able to write loops, functions, and recursion in one language and follow array accesses. Use Programming Basics to fill gaps.
  • Know logarithms, sums, and elementary induction. Consult Mathematical Foundations for proof methods as needed.

Coverage ​

Chapter 1 establishes cost analysis. Chapters 2 through 8 cover data structures and graphs, Chapters 9 through 14 compare algorithms, and Chapter 15 adds structures for specific query needs.

Chapter 1 ​

Chapter 2 ​

Chapter 3 ​

Chapter 4 ​

Chapter 5 ​

Chapter 6 ​

Chapter 7 ​

Chapter 8 ​

Chapter 9 ​

Chapter 10 ​

Chapter 11 ​

Chapter 12 ​

Chapter 13 ​

Chapter 14 ​

Chapter 15 ​

Outcomes ​

  • Choose an implementation for lookup, insertion, sorting, or paths and state its input-size and memory constraints.
  • Explain correctness with an invariant, induction, or exchange argument, then look for counterexamples at the boundaries.
  • Distinguish worst-case, average, and amortized costs, and state how far a benchmark result can be generalized.

How to use this map ​

Start with complexity and linear structures, then move to trees, graphs, and algorithms. When reviewing an algorithm, work through an ordinary input and a boundary case by hand before checking the implementation. Correct complexity analysis does not stop an array index from going out of bounds.

Built with VitePress | Software Systems Atlas