Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Jack-Lee-Hiter/AlgorithmsByPython
/ rehash
Method
rehash
Hash.py:59–60 ·
view source on GitHub ↗
(self, oldhash, size)
Source
from the content-addressed store, hash-verified
57
return
key%size
58
59
def
rehash(self, oldhash, size):
60
return
(oldhash+1)%size
61
62
def
get(self, key):
63
startslot = self.hashfunction(key, len(self.slots))
Callers
2
put
Method · 0.95
get
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected