MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / Solution

Class Solution

Python/contains-duplicate.py:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class Solution:
7 def containsDuplicate(self, nums: List[int]) -> bool:
8 count = {}
9 for n in nums :
10 if count.get(n) != None :
11 return True
12 count[n] = 1
13 return False

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected