Backtracking

Unit 11 of 15

Core Patterns

Backtracking

Generate every subset, permutation or placement by making one choice at a time, exploring it, and undoing it. Prune dead branches early to keep exponential searches fast enough.

0 of 3 lessons complete, 0 of 8 problems solved

Coursework

37 min

Practice ladder

Start with the first problem, then work toward the harder variations. Run examples before submitting against all tests.

Next unit: Graphs