(int key)
| 20 | } |
| 21 | |
| 22 | public void remove(int key) { |
| 23 | int i = idx(key); |
| 24 | if (nodes[i] == null) return; |
| 25 | ListNode prev = find(nodes[i], key); |
| 26 | if (prev.next == null) return; |
| 27 | prev.next = prev.next.next; |
| 28 | } |
| 29 | |
| 30 | int idx(int key) { return Integer.hashCode(key) % nodes.length;} |
| 31 |
no test coverage detected