Question: Draw the 11-item hash table that results from using the hash function h(i) = (i mod 11) to hash the keys 12, 44, 13,

Draw the 11-item hash table that results from using the hash function

Draw the 11-item hash table that results from using the hash function h(i) = (i mod 11) to hash the keys 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, and 5, for each of the following assumptions: a) Assume collisions are handled by linear probing. (10 marks) b) Assume collisions are handled by double hashing using a secondary hash function h'(k) = 7 - (k mod 7). Using double hashing, if the primary hash function h maps some key k to a bucket A[i] (i.e., h(k)= i) but bucket A[i] is already occupied, then buckets A[(i + f(j)) mod N] are tried iteratively for j = 1, 2, 3, .... where f(j) =jh'(k), for some secondary hash function h'.

Step by Step Solution

3.46 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Assuming collisions are handled by Linear Probing and using the hash function hk k mod 11 Initial ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!