← All Chapters
11 topics

Algorithms and Data Structures

Race real algorithms, hash keys into buckets, and watch the call stack push and pop.

  1. 21Big-O and Time ComplexityRace six real algorithms and watch operation counts split apart as the input grows, from constant time to exponential
  2. 22Binary SearchHalve a sorted array each comparison to find a value, and watch how few steps it takes next to a linear scan
  3. 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
  4. 24SortingStep three real sorts through the same fixed array and compare how many comparisons and moves the slow and fast ones take
  5. 25Linked List vs ArrayRun the same operation on both structures and count the real shifts, walks, and pointer rewrites each one costs
  6. 26Hash TablesHash keys into buckets by a visible character-code rule, watch collisions chain up, and track load factor live
  7. 27Binary Search TreesInsert and search values down a tree, then watch a sorted insert order collapse it into a slow straight line
  8. 28Graph Traversal (BFS and DFS)Walk one graph two ways and watch the only real difference, a queue versus a stack, reorder the visits
  9. 29Heaps and Priority QueuesAn array that is secretly a tree, and how it hands you the largest item every time
  10. 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
  11. 31Dynamic ProgrammingCompute Fibonacci naively and watch the call tree explode with repeated work, then memoize and see it collapse