Skip to content

Commit 58057f0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b35df75 commit 58057f0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

interview-bootcamp/Two-Sum.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@ def two_sum(nums: list[int], target: int) -> tuple[int, int] | None:
88
"""
99
num_set = set()
1010

11-
1211
for num in nums:
1312
complement = target - num
1413
if complement in num_set:
1514
return (complement, num)
1615
num_set.add(num)
1716

18-
1917
return None
2018

2119

22-
2320
if __name__ == "__main__":
24-
print(two_sum([2, 7, 11, 15], 9))
21+
print(two_sum([2, 7, 11, 15], 9))

0 commit comments

Comments
 (0)