Prune to Survive the Time Limit
Cut branches that cannot improve.
Why Pruning Matters
Raw backtracking can explore far too many branches and hit the time limit. Pruning cuts hopeless branches early to keep you fast. ✂️
What Pruning Really Is
Pruning means stopping a branch the moment you can prove it cannot reach a valid or better answer. You skip exploring it entirely.
All lessons in this course
- Think Recursively: Base & Recurse
- Generate All Subsets
- Permutations and the N-Queens Idea
- Prune to Survive the Time Limit