Permutations

Please input an integer array, and we will generate all possible permutations of the elements in the array. The number of elements in the array cannot exceed 7.