When to Use Backtracking

Use backtracking when:

1.1. You need to find all solutions or count valid configurations

2.2. Choices at each step depend on previous choices

3.3. You can detect invalid partial solutions early

4.4. The search space is finite but too large to enumerate naively

Backtracking shines when constraints let you prune large branches. If you can't prune, consider DP or other approaches instead.