We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93273c4 commit f4f44c2Copy full SHA for f4f44c2
1 file changed
two-sum/gyeo-ri.py
@@ -12,18 +12,18 @@ def twoSum(self, nums: list[int], target: int) -> list[int]:
12
13
if __name__ == "__main__":
14
test_cases = [
15
- ([2, 7, 11, 15], 9, [0, 1]),
16
- ([3, 2, 4], 6, [1, 2]),
17
- ([3, 3], 6, [0, 1]),
18
- ([-2, -3, 0, 3], 1, [0, 3]),
19
- ([0, -5, 2, 6], -3, [1, 2]),
20
- ([4, 7, 2, 0, 0], 0, [3, 4]),
+ ([2, 7, 11, 15], 9, {0, 1}),
+ ([3, 2, 4], 6, {1, 2}),
+ ([3, 3], 6, {0, 1}),
+ ([-2, -3, 0, 3], 1, {0, 3}),
+ ([0, -5, 2, 6], -3, {1, 2}),
+ ([4, 7, 2, 0, 0], 0, {3, 4}),
21
]
22
23
solution = Solution()
24
for idx, case_ in enumerate(test_cases):
25
nums, target, answer = case_
26
result = solution.twoSum(nums, target)
27
- assert (
28
- answer == result
+ assert answer == set(
+ result
29
), f"Test Case {idx} Failed: Expected {answer}, Got {result}"
0 commit comments