Permutations Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. 求数组元素的全排列,数组不含重复元素 算法1:递归 类似于DFS的递归. 对于包含n个元素的数组,先确定第一位置的元素,…