Concept Flow - Generate All Permutations of Array
Start with full array
Choose element at index i
Swap element i with element j
Recurse on sub-array i+1 to end
If at last index, record permutation
Backtrack: swap back elements i and j
↩Back to choose next j
We pick each element in turn, swap it to the current position, recurse on the rest, then swap back to restore order.
