This commit is contained in:
2026-01-28 15:56:45 +03:00
parent 8bdba1f2f2
commit 3907f75973
11 changed files with 89 additions and 0 deletions

10
1. Two Sum/solution.py Normal file
View File

@@ -0,0 +1,10 @@
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
d: dict = {}
for i in range(len(nums)):
if (target - nums[i]) in d.keys():
return [i, d[target - nums[i]]]
else:
d[nums[i]] = i