Get returns the value associated with the given key
(key any)
| 39 | |
| 40 | // Get returns the value associated with the given key |
| 41 | func (hm *HashMap) Get(key any) any { |
| 42 | node := hm.getNodeByKey(key) |
| 43 | if node != nil { |
| 44 | return node.value |
| 45 | } |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | // Put inserts a new key-value pair into the hashmap |
| 50 | func (hm *HashMap) Put(key, value any) { |
nothing calls this directly
no test coverage detected