Skip to content

Commit 30af8f4

Browse files
committed
Time: 0 ms (100%), Space: 17.9 MB (57.56%) - LeetHub
1 parent 16a0781 commit 30af8f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)