Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ hash
Method
hash
go/0706-design-hashmap.go:28–30 ·
view source on GitHub ↗
(key int)
Source
from the content-addressed store, hash-verified
26
}
27
28
func
(this *MyHashMap) hash(key int) int {
29
return
key % len(this.Array)
30
}
31
32
func
(this *MyHashMap) Put(key int, value int) {
33
cur := this.Array[this.hash(key)]
Callers
3
Put
Method · 0.95
Get
Method · 0.95
Remove
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected