From 33bd68f365a83bb16870484ed3ac56eae4a5133c Mon Sep 17 00:00:00 2001 From: parkinhyo Date: Wed, 4 Nov 2020 21:41:06 +0900 Subject: [PATCH] Fix 9-1.py 9-2.py --- 3-linear-data-structures/ch07/9-1.py | 2 +- 3-linear-data-structures/ch07/9-2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/3-linear-data-structures/ch07/9-1.py b/3-linear-data-structures/ch07/9-1.py index 0026e28..f39fbae 100644 --- a/3-linear-data-structures/ch07/9-1.py +++ b/3-linear-data-structures/ch07/9-1.py @@ -18,6 +18,6 @@ def threeSum(self, nums: List[int]) -> List[List[int]]: if k > j + 1 and nums[k] == nums[k - 1]: continue if nums[i] + nums[j] + nums[k] == 0: - results.append((nums[i], nums[j], nums[k])) + results.append([nums[i], nums[j], nums[k]]) return results diff --git a/3-linear-data-structures/ch07/9-2.py b/3-linear-data-structures/ch07/9-2.py index aa96e5e..195976f 100644 --- a/3-linear-data-structures/ch07/9-2.py +++ b/3-linear-data-structures/ch07/9-2.py @@ -21,7 +21,7 @@ def threeSum(self, nums: List[int]) -> List[List[int]]: right -= 1 else: # `sum = 0`인 경우이므로 정답 및 스킵 처리 - results.append((nums[i], nums[left], nums[right])) + results.append([nums[i], nums[left], nums[right]]) while left < right and nums[left] == nums[left + 1]: left += 1