Data Structures & Algorithms Cheat Sheet
Complexity, the classic structures, and the algorithm patterns from the track — tiny Python sketches of the idea, not full solutions. Bookmark it.
Projects to build
The fastest way to make this stick. Build one, then put it in your portfolio.
Operation counter
Time a single loop and a nested loop on lists of size 1,000, 10,000 and 100,000. Plot the times and label each curve O(n) or O(n²).
Undo stack and print queue
A tiny text buffer whose undo history is a stack, plus a print queue that releases jobs in arrival order. Trace five operations by hand, then code them.
Two phone books
Store the same contacts in a dict and in a sorted list of names. Search both, and count the comparisons so hashing and binary search are visible side by side.
Grid maze
Represent a grid maze as a graph. Find a shortest path with BFS and any path with backtracking, then mark where the two routes differ.
Coins that fool greedy
For coins such as 1, 5 and 6 making 10, compute the greedy pick and a bottom-up DP table. Explain which cells each amount reuses, and why greedy used more coins.
