Algorithms and Data Structures
Race real algorithms, hash keys into buckets, and watch the call stack push and pop.
- 21Big-O and Time ComplexityRace six real algorithms and watch operation counts split apart as the input grows, from constant time to exponential
- 22Binary SearchHalve a sorted array each comparison to find a value, and watch how few steps it takes next to a linear scan
- 23Recursion and the Call StackSolve Towers of Hanoi one move at a time and watch the call stack push and pop as the recursion descends and returns
- 24SortingStep three real sorts through the same fixed array and compare how many comparisons and moves the slow and fast ones take
- 25Linked List vs ArrayRun the same operation on both structures and count the real shifts, walks, and pointer rewrites each one costs
- 26Hash TablesHash keys into buckets by a visible character-code rule, watch collisions chain up, and track load factor live
- 27Binary Search TreesInsert and search values down a tree, then watch a sorted insert order collapse it into a slow straight line
- 28Graph Traversal (BFS and DFS)Walk one graph two ways and watch the only real difference, a queue versus a stack, reorder the visits
- 29Heaps and Priority QueuesAn array that is secretly a tree, and how it hands you the largest item every time
- 30Dijkstra's Shortest PathLock in the nearest node and relax its edges until every shortest distance from a source is found, then trace any path
- 31Dynamic ProgrammingCompute Fibonacci naively and watch the call tree explode with repeated work, then memoize and see it collapse