Algorithms
Step-by-step recipes for searching, sorting and finding routes, run on real inputs so you can count the work.
Pathfinding: BFS, Dijkstra, Bellman-Ford and A*
Four ways to find a route on the same map. One of them finds the fewest steps and the most expensive route.
Not started.Intermediate14 minString Search
Naive, KMP, Boyer-Moore and Rabin-Karp look for one word in the same sentence. One of them reads the pattern backwards and skips most of the text.
Not started.Intermediate12 minBinary Search
A million items in twenty checks, and the overflow bug that hid in the textbook version for years.
Not started.Beginner8 minReading Big-O from Code
Two nested loops are not always O(n²). Count the steps the inner loop really takes.
Not started.Beginner9 minRecursion and Memoization
Naive fib(30) makes 2,692,537 calls, most of them repeats. One cache turns the call tree into a line.
Not started.Beginner10 minQuicksort
Pick a pivot, split around it, repeat on each side. Watch each split put one item in its final place.
Not started.Intermediate10 minDepth-First Tree Traversal
Walking a tree to the bottom before going sideways. The same pattern repeats at every level, smaller each time.
Not started.Beginner8 minSorting Algorithms
Bubble, selection, insertion and merge sort put the same bars in order. Count the comparisons each one needs, and see why one of them pulls ahead as the list grows.
Not started.Beginner12 minDynamic Programming
Fewest coins to make an amount. The greedy answer is wrong, the brute-force answer is slow, and a small table gets it right.
Not started.Intermediate11 minGraph Traversal: BFS and DFS
Two ways to visit everything in a graph. One spreads out in rings using a queue. The other dives deep using a stack.
Not started.Beginner9 minTwo Pointers and Sliding Window
Two markers moving through an array turn a search over every pair into a single pass.
Not started.Intermediate9 min