#1. Two Sum

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        dic ={}
        for i,n  in enumerate(nums):
            if target-n in dic:
                return [dic[target-n],i]
            else:
                dic[n]=i
e4490b1607311c09e0a0037612eaa1c4f3c96b12
<mask token>

class Solution:
    <mask token>

class Solution:

    def twoSum(self, nums: List[int], target: int) ->List[int]:
        dic = {}
        for i, n in enumerate(nums):
            if target - n in dic:
                return [dic[target - n], i]
            else:
                dic[n] = i

#1. Two Sum

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        dic ={}
        for i,n  in enumerate(nums):
            if target-n in dic:
                return [dic[target-n],i]
            else:
                dic[n]=i