4 subtopics · 11 problems
Recursion & Backtracking
Generate solutions by exploring all possibilities, prune when invalid.
01Basic Recursion
Solve problems by breaking them into smaller subproblems recursively.
1 easy2 medium
| Problem | Difficulty | Link |
|---|---|---|
| 1843CSum in Binary Tree | easy | Solve |
| 1829DGold Rush | medium | Solve |
| 431Ck-Tree | medium | Solve |
02Generate Permutations & Subsets
Enumerate all permutations or subsets of a collection.
1 easy1 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1873BGood Kid | easy | Solve |
| 1515CPhoenix and Towers | medium | Solve |
| 1360GA/B | hard | Solve |
03Backtracking with Pruning
Prune the search tree early to avoid exponential blowup.
2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1294CProduct of Three Numbers | medium | Solve |
| 1862DIce Cream Balls | medium | Solve |
| 1904DSet To Max | hard | Solve |
04Meet in the Middle
Split input in half, enumerate both halves, merge results.
2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 888EMaximum Subsequence | hard | Solve |
| 1006FXor Paths | hard | Solve |
Was this helpful?