extendible hashing
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.
精彩评论