Skip to content

Commit da60a22

Browse files
committed
Time: 3 ms (52.69%) | Memory: 20.5 MB (40.59%) - LeetSync
1 parent 9b186a6 commit da60a22

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

1-two-sum/two-sum.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
class Solution:
22
def twoSum(self, nums: List[int], target: int) -> List[int]:
3-
ind ={}
3+
ind = {}
44
for n in range(len(nums)):
55
sum = target - nums[n]
66

77
if(sum in ind):
8-
return [ ind[sum], n]
8+
return [ind[sum], n]
99
ind[nums[n]] = n
10-
return []
10+
return []
11+

0 commit comments

Comments
 (0)