New creates a new HashMap instance with the specified size and capacity
(size, capacity uint64)
| 30 | |
| 31 | // New creates a new HashMap instance with the specified size and capacity |
| 32 | func New(size, capacity uint64) *HashMap { |
| 33 | return &HashMap{ |
| 34 | size: size, |
| 35 | capacity: capacity, |
| 36 | table: make([]*node, capacity), |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | // Get returns the value associated with the given key |
| 41 | func (hm *HashMap) Get(key any) any { |