(key int)
| 53 | } |
| 54 | |
| 55 | func (this *MyHashMap) Remove(key int) { |
| 56 | cur := this.Array[this.hash(key)] |
| 57 | for cur.Next != nil && cur.Next.Key != key { |
| 58 | cur = cur.Next |
| 59 | } |
| 60 | if cur != nil && cur.Next != nil { |
| 61 | cur.Next = cur.Next.Next |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Your MyHashMap object will be instantiated and called as such: |