Skip to content

Commit c470b29

Browse files
hashMap modify
1 parent a4f8a2a commit c470b29

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

AlgorithmAndDataStructure/11-Hash表.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,11 @@ private void resize() {
20612061
}
20622062
}
20632063
}
2064+
2065+
private int index(Node<K, V> node) {
2066+
return node.hashCode & (table.length - 1);
2067+
}
2068+
20642069
private void moveNode(Node<K,V> newNode){
20652070
// 重置该结点的所有引用
20662071
newNode.parent = null;

0 commit comments

Comments
 (0)