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
- 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 Patient Router: Bellman-FordDon't memorize Bellman-Ford — watch the distances settle. Find shortest paths from one source even with negative edge weights by relaxing every edge round after round until nothing improves, then one extra pass to catch a negative cycle. See why Dijkstra's greedy commit breaks on negatives while Bellman-Ford's patience doesn't — O(V·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 →