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 on subarray from i+1
If i == end, output current 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 the array.
