top of page
Recursion & Backtracking
10 problems · Easy to Hard · Recursion and backtracking
Backtracking is a systematic way to explore all possible solutions by building candidates incrementally and pruning branches that can't lead to a valid answer. This track starts with foundational recursive problems like Permutations and Subsets, introduces constraint-based pruning through N-Queens and Combination Sum, and culminates in two of the hardest backtracking problems in interviews: Word Search and Sudoku Solver.
Why it matters:
Recursion problems expose how a candidate thinks about state — what to pass down, what to track, and when to undo a choice. Interviewers use backtracking specifically to test whether you can write recursive code that's both correct and pruned efficiently, since an unpruned solution almost always times out on real input.
bottom of page