Backtracking systematically explores solution decision trees recursively, pruning invalid state paths as soon as constraints are violated. Master Permutations, Combinations, Sudoku Solvers, and N-Queens in C++.
Choose -> Explore -> Un-choose: Make a choice, make recursive call, then restore state (pop_back / unflag).
Constraint Pruning: Abort recursive branches early if validity conditions fail.
Permutations vs Subsets: Permutations order elements (used vector), Subsets pick combinations (index offset).
O(1) Diagonal Check: Represent diagonal attacks via 'row + col' and 'row - col + N' lookup arrays.