Skip to content

Instantly share code, notes, and snippets.

class Solution(object):
def containsDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
# 邏輯是對的,但是會Time Limit Exceeded
# for j in range(0, len(nums)-1):
# temp = nums[j]
# for i in range(j+1,len(nums)):