Backtracking
Build an answer one choice at a time, and undo the last choice when it leads nowhere. The tell is a request to list every subset, arrangement or valid combination, as in Subsets and Permutations. Pruning bad branches early keeps the search manageable.
20 problems · 5 with a video · 3 to practice in an AI round
| # | Problem | Difficulty | Video | AI round |
|---|---|---|---|---|
| 1 | Generate Parentheses | Medium | — | AI round |
| 2 | Combination Sum | Medium | — | |
| 3 | Letter Combinations of a Phone Number | Medium | — | |
| 4 | Permutations | Medium | AI round | |
| 5 | Subsets | Medium | AI round | |
| 6 | Word Search | Medium | — | |
| 7 | N-Queens | Hard | — | |
| 8 | Palindrome Partitioning | Medium | — | |
| 9 | Target Sum | Medium | ||
| 10 | Combination Sum II | Medium | — | |
| 11 | Sudoku Solver | Hard | — | |
| 12 | Subsets II | Medium | ||
| 13 | Permutations II | Medium | ||
| 14 | Combinations | Medium | — | |
| 15 | Path Sum II | Medium | — | |
| 16 | Word Ladder II | Hard | — | |
| 17 | Remove Invalid Parentheses | Hard | — | |
| 18 | Restore IP Addresses | Medium | — | |
| 19 | Robot Room Cleaner | Hard | — | |
| 20 | Optimal Account Balancing | Hard | — |
Sort by what interviews ask
Sign in to see how many companies ask each problem, sort all 500 by it or by likes, and tick off what you solve.
Practice in an AI round
Three of these are AI rounds: 30 minutes, an AI agent beside your code, then a scored report.
Practice Generate Parentheses in an AI roundYour first AI round is free.