mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 15:06:07 +00:00
Fine-tune the docs.
This commit is contained in:
@@ -538,7 +538,7 @@ index = hash(key) % capacity
|
||||
|
||||
## 哈希冲突与扩容
|
||||
|
||||
本质上看,哈希函数的作用是黄输入空间(`key` 范围)映射到输出空间(数组索引范围),而输入空间往往远大于输出空间。因此,**理论上一定存在“多个输入对应相同输出”的情况**。
|
||||
本质上看,哈希函数的作用是将输入空间(`key` 范围)映射到输出空间(数组索引范围),而输入空间往往远大于输出空间。因此,**理论上一定存在“多个输入对应相同输出”的情况**。
|
||||
|
||||
对于上述示例中的哈希函数,当输入的 `key` 后两位相同时,哈希函数的输出结果也相同。例如,查询学号为 12836 和 20336 的两个学生时,我们得到:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user