class Solution:
    def findDuplicates(self, nums: List[int]) -> List[int]:
        result = []
        h = {}
        if(len(nums) == 0):
            return []
        for i in range(len(nums)):
            if(nums[i] not in h):
                h[nums[i]] = 1
            else:
                result.append(nums[i])
            
        return result

5923cd85f44aa0ab1d911beb19199369fe9edc44
<mask token>

class Solution:
    <mask token>

class Solution:

    def findDuplicates(self, nums: List[int]) ->List[int]:
        result = []
        h = {}
        if len(nums) == 0:
            return []
        for i in range(len(nums)):
            if nums[i] not in h:
                h[nums[i]] = 1
            else:
                result.append(nums[i])
        return result

class Solution:
    def findDuplicates(self, nums: List[int]) -> List[int]:
        result = []
        h = {}
        if(len(nums) == 0):
            return []
        for i in range(len(nums)):
            if(nums[i] not in h):
                h[nums[i]] = 1
            else:
                result.append(nums[i])
            
        return result
