"""
217
contains duplicate
easy
"""

from typing import List


class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:

        # hash

        mem = set()
        for num in nums:
            if num in mem:
                return True
            else:
                mem.add(num)

        return False


