📘 LeetCode Explorer

ID Title Difficulty Tags Link Solution
1 Two Sum Easy Array, Hash Table View
class Solution:
    def twoSum(self, nums, target):
        hashmap = {}
        for i, num in enumerate(nums):
            diff = target - num
            if diff in hashmap:
                return [hashmap[diff], i]
            hashmap[num] = i