在许多书籍、教学大纲、教程中,我看到找到一个项目的合适单元格的一个好选择是计算单元格的数量: item.hash()%(n-1) = # of the bucket.
item.hash()%(n-1) = # of the bucket.
但是为什么要提到这个特定的表达呢?
倒数(n-1)%item.hash() = # of the bucket与它有何不同?
(n-1)%item.hash() = # of the bucket
PS我知道Java HashMap使用(n - 1) & hash,我只想抓住这两种方法之间稀疏键的区别。
(n - 1) & hash
四季花海
FFIVE
相关分类