Removes the mapping of the specified value key if this map contains a mapping for the key :type key: int :rtype: void
(self, key)
| 40 | return prev.next.val |
| 41 | |
| 42 | def remove(self, key): |
| 43 | """ |
| 44 | Removes the mapping of the specified value key if this map contains a mapping for the key |
| 45 | :type key: int |
| 46 | :rtype: void |
| 47 | """ |
| 48 | index = hash(key) % self.size |
| 49 | if self.nodes[index] is None: |
| 50 | return |
| 51 | prev = find(self.nodes[index], key) |
| 52 | if prev.next is None: |
| 53 | return |
| 54 | prev.next = prev.next.next |
| 55 | |
| 56 | |
| 57 | def find(bucket, key): |
no test coverage detected