75 problems across 18 core coding patterns, in an order that builds. Work through it in order, or jump to the pattern you need.
Sign up free to save your progress.
Count, group and look things up in one pass.
Walk in from both ends and drop the inner loop.
Grow and shrink a window instead of rescanning.
Match, undo and look back, last in, first out.
Halve the search space every step, on arrays and on answers.
Rewire nodes in place, with slow and fast pointers.
Depth-first and breadth-first on binary trees.
Prefix trees for word lookups.
Keep the top k, or the next smallest, at hand.
Try every choice and undo the dead ends.
Islands, paths and orderings with BFS and DFS.
Weighted shortest paths and spanning trees.
Build each answer from the smaller ones before it.
Grids and two-string problems, one table at a time.
Take the best step now, and know why it holds.
Sort by start, then merge, insert or count overlaps.
Matrices, digits and number tricks.
XOR, masks and counting set bits.