TALLMOVE

Algorithms & Data Structures

Sorting, searching, graphs, and the machinery behind efficient computation.

Analysis

Amortized Analysis

Sorting

Bubble Sortin progress

intro · ~15 min

Watch the real library implementation sweep the array again and again, swapping neighbors until a pass finds nothing left to swap.

Selection Sortin progress

intro · ~15 min

Watch the real library implementation scan for the smallest remaining bar and swap it to the front, one final position per pass.

Insertion Sortin review

intro · ~20 min

Watch the real library implementation execute line by line while it grows a sorted prefix through the array.

Shellsortin progress

core · ~20 min

Watch the real library implementation insertion-sort the array at shrinking gaps, so far-apart bars move long distances in one hop.

Merge Sortin progress

core · ~25 min

Watch the real library implementation split the array down to single bars, then merge sorted halves back together through one auxiliary buffer.

Quicksortin progress

core · ~25 min

Watch the real library implementation partition the array around pivots that land in their final slots and never move again.

Heapsortin progress

core · ~25 min

Watch the real library implementation turn the array into a max heap, then retire the maximum to the end again and again.

Timsortin progress

advanced · ~30 min

Watch the real library implementation find natural runs, extend short ones with binary insertion, and merge them under the stack rules that keep it fast.

Radix Sortin review

core · ~25 min

Watch the real library implementation sort three-digit values without a single comparison: bucket by ones, then tens, then hundreds.

Sorting Networksin progress

advanced · ~30 min

Watch Batcher's odd-even merge network sort the array with a fixed schedule of compare-exchanges that never looks at the data to decide what happens next.

Searching

Data Structures

Heaps & Priority Queuesin review

core · ~25 min

One array read as a tree that always knows its minimum: a push climbs, a pop sinks, and building from a batch costs less than pushing one by one, every hop bounded by the height.

Hash Tablesin review

core · ~25 min

A key's slot is computed from the key itself, so a lookup goes straight there. What happens when two keys want one slot, why the load factor governs every cost, and when the table doubles.

Union-Find: Disjoint Setsin review

core · ~25 min

A forest of parent pointers answers 'are these two in the same set?' in a few hops: find climbs to a root, union hangs one root under another, and two tricks keep every tree nearly flat.

Balanced Trees: AVL & Red-Blackin review

core · ~30 min

A search tree is only as fast as it is shallow. Watch sorted keys hang a plain tree into a chain, then watch an AVL tree rotate on the way back up and stay a few levels deep.

Skip Listsin review

core · ~25 min

A sorted list with express lanes: coin flips at insertion set each key's tower, a lookup walks right and down in about 2 log n hops, and nothing ever rotates.

Sparse Setsin review

core · ~25 min

Two arrays make a set over small integers with O(1) insert, remove, membership, and clear, no clearing of memory needed: dense packs the members, sparse points each value at its slot.

Bloom Filtersin review

core · ~25 min

A row of bits and a few hashes answer 'have I seen this?' with no false negatives and a tunable chance of a false positive, in space far smaller than the keys themselves.

Count-Min Sketchin review

core · ~25 min

A few rows of counters, each indexed by its own hash, estimate how often anything appeared in a stream: never below the truth, rarely far above it, in space that ignores the stream's length.

HyperLogLogin review

advanced · ~25 min

Count distinct items in a stream with a few bytes: hash each one, let the longest run of leading zeros in each bucket estimate the count, and average the buckets harmonically.

Persistent Data Structuresin review

core · ~25 min

Insert into a tree without touching the old one: copy the path from the root, share every other subtree, and every version stays readable forever at a logarithmic cost per change.

Graphs

Graph Traversal: BFS & DFSin progress

intro · ~20 min

Visit every reachable node once with one loop and a frontier. Take from the front and it ripples out in layers; take from the back, marking nodes as they come off, and it plunges down a branch.

Shortest Paths: Dijkstrain progress

core · ~25 min

Settle the nearest node, relax its edges, repeat. A heap keeps the nearest at hand, a stale entry is skipped, and every settled distance is final because no edge is negative. BFS, ordered by distance.

A* Searchin progress

core · ~25 min

Dijkstra with a compass: rank the open set by the cost so far plus an estimate of the cost to go. An estimate that never overstates keeps the path optimal in fewer expansions; overstate it, it errs.

Topological Sortin review

core · ~25 min

Order the nodes of a directed graph so every edge points forward: peel off nodes with nothing left pointing at them, or finish a depth-first walk and read it backwards.

Minimum Spanning Trees: Kruskal and Primin review

core · ~25 min

Connect every waypoint with the least total length: Kruskal takes edges cheapest first and skips any that close a cycle; Prim grows one tree from a start by its cheapest frontier edge.

Max Flowin review

core · ~25 min

Push as much as the pipes allow from source to sink: find a path with room, send its bottleneck, record how to undo it, repeat; the final blocked set is the minimum cut.

PageRankin review

core · ~25 min

A page is important if important pages link to it: rank flows along links each round, a damping share teleports anywhere, and the ranks settle to a fixed point no matter where they start.

Strings

String Search: KMPTries

Compression

Dynamic Programming

Edit DistanceThe Knapsack ProblemSeam Carving

Randomness

Fisher-Yates ShuffleReservoir Sampling

Meta-heuristics

Simulated AnnealingGenetic AlgorithmsAnt Colony OptimizationWhale Optimization AlgorithmTeaching-Learning-Based Optimization