Data structures
Big picture: the cost of an algorithm depends on the structure it walks. Sorts and searches first, then trees and graphs, then the searches that need those structures.
Reading order
- Sort and search: comparison sorts, and searching a sorted collection.
- Recursion and dynamic programming: solving a problem from smaller versions of itself, and when to store the answers.
- Trees and graphs: binary trees, heaps, and graphs.
- BFS and DFS: the two walks over those structures.
- Balanced trees: AVL, red-black, and B-trees, so a search stays cheap.
- Shortest paths and ordering: topological sort and Dijkstra.
Related
- Breadth-first search: a functional take on the same walk.