本文中采用开链法(separate chaining)来处理“冲突”(collision),而且hashtable只存储唯一的元素,不存在重复。 实现代码如下: class hashtable
基于1个网页-相关网页
separate chaining hashing 分离链接散列法 ; 分离炼接散列寻址法
In separate chaining the load factor can rise above 1 without hurting performance very much.
在链地址法制,装填因子可以达到1以上,且对性能影响不大。
There are no probes in separate chaining, so there's no need to worry that a probe will go into an endless sequence because the step size divides evenly into the array size.
这里没有探测,所以不需要担心探测会因为表容量能被步长整除,而陷入无限的循环中。
应用推荐