Skip to content

Commit d154fee

Browse files
Update 001_Two_Sum.py
1 parent 4925b5d commit d154fee

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

001_Two_Sum.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
class Solution:
22
def twoSum(self, nums: List[int], target: int) -> List[int]:
3-
# nums_index = list(enumerate(nums))
4-
# nums_index.sort()
5-
# print(nums)
63
for i in range(len(nums)):
74
complement = target-nums[i]
85
if complement in nums and nums.index(complement) != i:
96
return [i,nums.index(complement)]
10-
# for i in range(len(nums)-1):
11-
# j=i+1
12-
# while j < len(nums):
13-
# if nums[i]+nums[j]==target:
14-
# return [i, j]
15-
# j += 1
16-
# i += 1
17-
# return result

0 commit comments

Comments
 (0)