Solution Review: All Permutations of an Integer List
This review provides a detailed analysis of generating all permutations of an integer list.
We'll cover the following...
We'll cover the following...
Solution
At each recursive call, we swap the number at index i with all the array elements on its right. We recursively repeat the process for sub-arrays until the sub-array of one element is left.
Let’s look at the illustration to better understand the solution before reviewing its code.
Coding exercise
Time complexity
The time complexity of the solution is ...