开发者

extendible hashing

开发者 https://www.devze.com 2023-01-01 03:54 出处:网络
I need to make a program that shows the hash value of a given key, using extendible hashing. In extendible hashing, I know that the buckets split and directories change. So if I make my program, do I

I need to make a program that shows the hash value of a given key, using extendible hashing.

In extendible hashing, I know that the buckets split and directories change. So if I make my program, do I have to already know things 开发者_如何学Golike if the bucket it hashes to is filled, or do I not have to worry about those things and just compute a hash value based on the key?


In an extendable hashing scheme, you can calculate a hash value based soley on the key. However, when operating on the table, you only use the top N bits of the key, where N grows with the number of buckets.

So you do need to worry about the current bucket statistics if you want to implement an extendable hash, but not to simply calculate a hash value.

0

精彩评论

暂无评论...
验证码 换一张
取 消