Skip to content

Commit ed58632

Browse files
committed
Fixes #9014
1 parent a438306 commit ed58632

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: data_structures/arrays/permutations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def permute_recursive(nums: list[int]) -> list[list[int]]:
1010
return [[]]
1111
for _ in range(len(nums)):
1212
n = nums.pop(0)
13-
permutations = permute_recursive(nums)
13+
permutations = permute_recursive(nums.copy())
1414
for perm in permutations:
1515
perm.append(n)
1616
result.extend(permutations)

0 commit comments

Comments
 (0)