Skip to content

Commit 8188ea6

Browse files
authored
Merge pull request #367 from MoigeMatino/fix-three-sum
fix: fix three_sum.py bug
2 parents f7de04d + f1a28f7 commit 8188ea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arrays_and_strings/three_sum/three_sum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def three_sum(nums: List[int]) -> List[List[int]]:
3434

3535
# If the sum is zero, append the triplet to the result and skip duplicates
3636
if current_sum == 0:
37-
triplets.append([nums[i], nums[low], nums[high]])
37+
triplets.append(([nums[i], nums[low], nums[high]))
3838
# Skip duplicates of the low pointer to avoid redundant triplets
3939
while low < high and nums[low] == nums[low + 1]:
4040
low += 1

0 commit comments

Comments
 (0)