If n is entered, the full permutation of n is returned. If 3 is entered, the full permutation of 3 is returned.

If you have not prepared the children, do not look down on this problem. This one uses recursion and backtracking. It’s an entry-level algorithm, but you have to write it yourself to know how difficult it is.

Look carefully at your answers



If you don’t understand the code, please feel free to communicate with me.

Tips: more algorithm information, fun project source code, free to receive, attention to the public number: poetry of the code