Subject
Algorithms
Data structures and algorithms, one idea per article, explained in plain words with diagrams and worked examples. Each one opens with a mind map for fast revision, builds the idea up from a picture, and ends with questions to test yourself against. Short on purpose: these are meant to be re-read quickly, not studied.
Articles
-
Breadth-first search
Searching in rings, why BFS finds the shortest path, BFS on a grid, multi-source BFS, 0-1 BFS, bidirectional BFS, and when to reach for DFS instead.
-
Depth-first search
Going deep before wide, recursion and the explicit stack, entry and exit times, cycle detection with three states, components and backtracking, and the stack overflow trap.
-
Topological sort
Ordering a dependency graph so nothing comes before what it needs: Kahn's algorithm, the DFS version, cycle detection, deterministic order and parallel levels.
-
Union-find
The forest of sets, find and union, why the trees degenerate, path compression, union by size, and what the structure cannot do.
-
Dijkstra's algorithm
Why BFS fails once edges have weights, relaxing edges, the priority queue and lazy deletion, why negative edges break it, and how A star relates.