Modify Exercise P16.14 to use double hashing. The ith index in the probing sequence is computed
Question:
Modify Exercise ••• P16.14 to use double hashing. The ith index in the probing sequence is computed as (h + i h2(k)) % L, where k is the original hash key before compression and h2 is a function mapping integers to non-zero values. A common choice is h2(k) = 1 + k % q for a prime q less than L.
Data from exercise 16.14
Implement a hash table with open addressing. When removing an element that is followed by other elements with the same hash code, replace it with the last such element and rehash the remaining elements of the probing sequence.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: