Backtracking for permutations follows this template:
If current solution is complete, save it
Loop through all candidates for the next position
If candidate is valid (not used, not duplicate), add it
Recurse
Backtrack (remove candidate, mark as unused)
This pattern works for permutations, combinations, subsets, and more.