We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16a0781 commit 30af8f4Copy full SHA for 30af8f4
0046-permutations/0046-permutations.py
@@ -0,0 +1,8 @@
1
+from itertools import permutations
2
+
3
+class Solution:
4
+ def permute(self, nums: List[int]) -> List[List[int]]:
5
+ ans = []
6
+ for i in permutations(nums):
7
+ ans.append(i)
8
+ return ans
0 commit comments