Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ add
Method
add
python/0705-design-hashset.py:6–8 ·
view source on GitHub ↗
(self, key: int)
Source
from the content-addressed store, hash-verified
4
self.hashset = []
5
6
def
add(self, key: int) -> None:
7
if
not self.contains(key):
8
self.hashset.append(key)
9
10
def
remove(self, key: int) -> None:
11
if
self.contains(key):
Callers
15
dfs
Method · 0.45
dfs
Method · 0.45
dfs
Method · 0.45
backtrack
Method · 0.45
backtrack
Method · 0.45
dfs
Method · 0.45
shortestPathBinaryMatrix
Method · 0.45
mergeTriplets
Method · 0.45
maxProbability
Method · 0.45
isValidSudoku
Method · 0.45
minCostConnectPoints
Method · 0.45
dfs
Method · 0.45
Calls
1
contains
Method · 0.95
Tested by
1
shortestPathBinaryMatrix
Method · 0.36