Skip to content

Commit f87aed0

Browse files
authored
Update HashMap.md
1 parent 2448742 commit f87aed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MD/HashMap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
由于在计算中位运算比取模运算效率高的多,所以 HashMap 规定数组的长度为 `2^n` 。这样用 `2^n - 1` 做位运算与取模效果一致,并且效率还要高出许多。
1818

19-
由于数组的长度有限,所以难免会出现不同的 Key 通过运算得到的 index 相同,这种情况可以利用链表来解决,HashMap 会在 `table[index]`处形成环形链表,采用头插法将数据插入到链表中。
19+
由于数组的长度有限,所以难免会出现不同的 Key 通过运算得到的 index 相同,这种情况可以利用链表来解决,HashMap 会在 `table[index]`处形成链表,采用头插法将数据插入到链表中。
2020

2121
## get 方法
2222

0 commit comments

Comments
 (0)