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 2c2c8d2 commit 20b652fCopy full SHA for 20b652f
two-sum/Sung-Heon.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def twoSum(self, nums: List[int], target: int) -> List[int]:
3
+ temp = {}
4
+ for i, num in enumerate(nums):
5
+ if target - num in temp:
6
+ return [i, temp[target - num]]
7
+ temp[num] = i
8
+ return None
0 commit comments