All 15 patterns
Most interview problems are one of these in disguise. Learn them in order, or jump to the one you need.
Show15 patterns
FOUNDATIONS
Start here. Arrays, pointers and windows.0 / 18 solved- 01Live nowArrays & HashingTrade memory for instant lookups.0 of 8 problems solved
- 02Live nowTwo PointersTwo indices walking toward an answer.0 of 3 problems solved
- 03Live nowSliding WindowA range that grows and shrinks as it scans.0 of 4 problems solved
- 04Live nowStackRemember the past, answer on the way back.0 of 1 problems solved
- 05Live nowBinary SearchHalve the search space every step.0 of 2 problems solved
STRUCTURES & RECURSION
Lists, trees and trying every option.0 / 23 solved- 06Live nowLinked ListRewire pointers without losing the chain.0 of 6 problems solved
- 07Live nowTreesRecursion that follows the branches.0 of 11 problems solved
- 08Live nowTriesShare prefixes, find words letter by letter.0 of 3 problems solved
- 09Live nowHeapsAlways know the smallest item.0 of 1 problems solved
- 10Live nowBacktrackingTry, recurse, undo.0 of 2 problems solved
ADVANCED
Graphs, dynamic programming and greedy choices.0 / 25 solved- 11Live nowGraphsExplore neighbours with BFS and DFS.0 of 6 problems solved
- 12Live now1-D DPSolve small, remember, build up.0 of 10 problems solved
- 13Live now2-D DPFill a table cell by cell.0 of 2 problems solved
- 14Live nowGreedyTake the best move now. Never look back.0 of 2 problems solved
- 15Live nowIntervalsSort by start, then merge or split.0 of 5 problems solved