Skip to content

Commit d8f85e8

Browse files
committedNov 18, 2023
refacotr
1 parent 4242f7c commit d8f85e8

File tree

186 files changed

+1040
-620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+1040
-620
lines changed
 

Diff for: ‎README.md

+215-161
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
from typing import List
2+
3+
24
class Solution:
3-
def twoSum(self, nums: List[int], target: int) -> List[int]:
5+
def twoSum(self, nums: List[int], target: int) -> List[int]: # type: ignore
46
"""
57
:type nums: List[int]
68
:type target: int
79
:rtype: List[int]
810
"""
9-
numMap = {} # value: index
11+
numMap = {} # value: index
1012
for index, value in enumerate(nums):
1113
diff = target - value
1214
if diff in numMap:
@@ -17,4 +19,4 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
1719
if __name__ == '__main__':
1820
nums = [2, 3, 5, 7, 11, 15]
1921
target = 9
20-
print(Solution().twoSum(nums, target))
22+
print(Solution().twoSum(nums, target))

0 commit comments

Comments
 (0)
Please sign in to comment.