Question: Some hash functions do not work as well as theoretically possible. Suppose that we use the hash function on integer keys i defined by
Some hash functions do not work as well as theoretically possible. Suppose that we use the hash function on integer keys i defined by h(i) = i mod B, where B is the number of buckets. a) What is wrong with this hash function if B = 10? b) How good is this hash function if B = 16? c) Are there values of B for which this hash function is useful?
Step by Step Solution
3.48 Rating (151 Votes )
There are 3 Steps involved in it
The hash function described hi i2 mod B is a straightforward hash function where you take the square of the input integer i and find the remainder whe... View full answer
Get step-by-step solutions from verified subject matter experts
