Finished this one? 0 / 99 Algorithms done
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Algorithms
- Six Degrees: Union-FindDon't memorize the Disjoint Set Union — play it. Wire up nine strangers one handshake at a time and watch separate friend circles merge into one, hit a redundant connection and see it refuse to close a cycle, then click any node to run find and watch path compression flatten the tree so the next lookup is instant. Union by rank, path compression and the near-constant O(α(n)) that powers Kruskal's MST — plus full theory, a runnable challenge and a quiz.Read →
- The Typo Fixer: Edit DistanceDon't memorize edit distance — watch the grid fill in. See how many insert, delete, and replace edits turn kitten into sitting, as a dynamic-programming table computes each cell from its diagonal, up, and left neighbors, then traces the cheapest path of edits back through the grid. The Levenshtein recurrence, match-is-free, and O(m·n) — plus full theory, a runnable challenge and a quiz.Read →
- The Cheapest Grid: Kruskal's MSTDon't memorize Kruskal's algorithm — watch it wire up a network. Connect eight towns for the least total cable by always laying the cheapest edge that doesn't close a loop, with Union-Find rejecting cycles on the fly and the minimum spanning tree turning green edge by edge. Greedy choice, the cut property, and O(E log E) — plus full theory, a runnable challenge and a quiz.Read →
- The Non-Backtracker: KMPDon't memorize KMP — watch the pattern slide. Find a pattern in a text in linear time by never re-reading a character: build the pattern's LPS failure table from its own repeats, then on a mismatch jump the pattern forward instead of restarting the text pointer. See the false start, the jump, and the match — plus the O(n+m) theory, a runnable challenge and a quiz.Read →
- The Word Tree: TrieDon't memorize the trie — watch words grow into a tree. Insert CAT, CAR, CARD, and DOG letter by letter and see shared prefixes share a path, with a flag marking where each real word ends. Then search a word and a prefix by walking down from the root. The O(length) prefix tree behind autocomplete — plus full theory, a runnable challenge and a quiz.Read →
- The Moving Frame: Sliding WindowDon't memorize the sliding window — watch it glide. Find the best sum of k consecutive numbers in one O(n) pass: as the frame slides, subtract the number leaving and add the number entering instead of re-summing. See the entering and leaving cells light up and the best window lock in — plus the fixed-vs-variable window theory, a runnable challenge and a quiz.Read →