Concept Flow - Generate All Permutations of Array
Start with full array
Choose element at index i
Swap element i with element j (j >= i)
Recurse with i+1
If i == array length - 1
Print current permutation
Backtrack: Swap back elements i and j
↩Back to swap step for next j
We pick each element in turn, swap it with the current position, recurse to fix the next position, print when done, then swap back to restore.