leetcode 46 全排列

Python内置的全排列函数

class Solution(object):
    def permute(self, nums):
        """
        :type nums: List[int]
        :rtype: List[List[int]]
        """
        from itertools import permutations
        return list(permutations(nums))
原文地址:https://www.cnblogs.com/woshizhizhang/p/10848022.html