剑指 Offer II 083. 没有重复元素集合的全排列
分析:
今天看的明日一练,这道题有点忘了怎么做了
先偷个懒,用了个全排列函数,后面再研究
代码:
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))
分析:
今天看的明日一练,这道题有点忘了怎么做了
先偷个懒,用了个全排列函数,后面再研究
代码:
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))