MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / contains

Method contains

python/0705-design-hashset.py:14–15  ·  view source on GitHub ↗
(self, key: int)

Source from the content-addressed store, hash-verified

12 self.hashset.remove(key)
13
14 def contains(self, key: int) -> bool:
15 return True if key in self.hashset else False
16
17
18# Your MyHashSet object will be instantiated and called as such:

Callers 2

addMethod · 0.95
removeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected