class Solution:

    def two_sums_hashmap(self, nums: [int], target) -> [int]:

        hash_map = {}

        idx = 0

        for i in nums:
            hash_map[i] = idx

            if (target - i) in hash_map:
                return [hash_map[target - i], idx]
            idx += 1

s = Solution()
response = Solution.two_sums_hashmap(s, [2, 7, 11, 15], 9)

assert response == [0, 1]

aad5e02d3b92ac2e36b8da48b31a88d88f219bf4
class Solution:
    <mask token>


<mask token>

class Solution:

    def two_sums_hashmap(self, nums: [int], target) ->[int]:
        hash_map = {}
        idx = 0
        for i in nums:
            hash_map[i] = idx
            if target - i in hash_map:
                return [hash_map[target - i], idx]
            idx += 1


<mask token>

class Solution:

    def two_sums_hashmap(self, nums: [int], target) ->[int]:
        hash_map = {}
        idx = 0
        for i in nums:
            hash_map[i] = idx
            if target - i in hash_map:
                return [hash_map[target - i], idx]
            idx += 1


<mask token>
assert response == [0, 1]

class Solution:

    def two_sums_hashmap(self, nums: [int], target) ->[int]:
        hash_map = {}
        idx = 0
        for i in nums:
            hash_map[i] = idx
            if target - i in hash_map:
                return [hash_map[target - i], idx]
            idx += 1


s = Solution()
response = Solution.two_sums_hashmap(s, [2, 7, 11, 15], 9)
assert response == [0, 1]

class Solution:

    def two_sums_hashmap(self, nums: [int], target) -> [int]:

        hash_map = {}

        idx = 0

        for i in nums:
            hash_map[i] = idx

            if (target - i) in hash_map:
                return [hash_map[target - i], idx]
            idx += 1

s = Solution()
response = Solution.two_sums_hashmap(s, [2, 7, 11, 15], 9)

assert response == [0, 1]
