gpt4 book ai didi

data-structures - 当实际哈希冲突超过 sizeof(Neighborhood) 时,Hopscotch 哈希表中会发生什么?

转载 作者:行者123 更新时间:2023-12-04 20:46:42 34 4
gpt4 key购买 nike

相关链接:http://en.wikipedia.org/wiki/Hopscotch_hashing

Hopscotch 哈希表看起来很棒,但我还没有在文献中找到这个问题的答案:如果我的邻域大小为 N 并且(由于渎职或非常糟糕的运气)我插入了 N+1 个元素,这些元素都哈希到相同的确切值?

最佳答案

article据说需要调整表的大小:

Finally, notice that if more than a constant number of items are hashed by h into a given bucket, the table needs to be resized. Luckily, as we show, for a universal hash function h, the probability of this type of resize happening given H = 32 is 1/32!.

关于data-structures - 当实际哈希冲突超过 sizeof(Neighborhood) 时,Hopscotch 哈希表中会发生什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16762411/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com