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

Method remove

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

Source from the content-addressed store, hash-verified

8 self.hashset.append(key)
9
10 def remove(self, key: int) -> None:
11 if self.contains(key):
12 self.hashset.remove(key)
13
14 def contains(self, key: int) -> bool:
15 return True if key in self.hashset else False

Callers

nothing calls this directly

Calls 1

containsMethod · 0.95

Tested by

no test coverage detected