Introduction
Given {1, 2, 3, , , n}, its full permutations number n!, which is the most basic high school combinatorics knowledge. Taking n=4 as an example, all of its permutations are shown in the figure below (presented in the form of a lexicographic-order tree):
It’s easy to think of using recursion to find all of its full permutations. Look carefully at the figure above: starting with 1, followed by the full permutations of {2, 3, 4}; starting with 2, followed by the full permutations of {1, 3, 4}; starting with 3, followed by the full permutations of {1, 2, 4}; starting with 4, followed by the full permutations of {1, 2, 3}.