剑指 Offer II 083. 没有重复元素集合的全排列

发布时间 2023-04-28 21:41:34作者: 猥琐丑八怪

 分析:

今天看的明日一练,这道题有点忘了怎么做了

先偷个懒,用了个全排列函数,后面再研究

代码:

1 class Solution(object):
2     def permute(self, nums):
3         """
4         :type nums: List[int]
5         :rtype: List[List[int]]
6         """
7         return list(itertools.permutations(nums))