# Hash table solution
class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:
        mapping = {}
        for n in nums:
            if n in mapping:
                return True
            else:
                mapping[n] = 1
        return False

# Using Python Set
class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:
        return len(set(nums)) < len(nums)


# Sorting solution
class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:
        nums = sorted(nums)
        for idx in range(len(n) - 1):
            if nums[i] == nums[i + 1]:
                return True
        return False
98298c3c09a082bb8852246b3718e75f4238be69
<mask token>


class Solution:
    <mask token>


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        nums = sorted(nums)
        for idx in range(len(n) - 1):
            if nums[i] == nums[i + 1]:
                return True
        return False

<mask token>


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        return len(set(nums)) < len(nums)


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        nums = sorted(nums)
        for idx in range(len(n) - 1):
            if nums[i] == nums[i + 1]:
                return True
        return False

class Solution:
    <mask token>


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        return len(set(nums)) < len(nums)


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        nums = sorted(nums)
        for idx in range(len(n) - 1):
            if nums[i] == nums[i + 1]:
                return True
        return False

class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        mapping = {}
        for n in nums:
            if n in mapping:
                return True
            else:
                mapping[n] = 1
        return False


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        return len(set(nums)) < len(nums)


class Solution:

    def containsDuplicate(self, nums: List[int]) ->bool:
        nums = sorted(nums)
        for idx in range(len(n) - 1):
            if nums[i] == nums[i + 1]:
                return True
        return False

# Hash table solution
class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:
        mapping = {}
        for n in nums:
            if n in mapping:
                return True
            else:
                mapping[n] = 1
        return False

# Using Python Set
class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:
        return len(set(nums)) < len(nums)


# Sorting solution
class Solution:
    def containsDuplicate(self, nums: List[int]) -> bool:
        nums = sorted(nums)
        for idx in range(len(n) - 1):
            if nums[i] == nums[i + 1]:
                return True
        return False