Question: Consider an open addressed hash table with double hashing, size m = 7 . The hash function h ( k , i ) and the

Consider an open addressed hash table with double hashing, size m =7. The hash function h(k, i) and the two auxiliary hash functions h1(k) and h2(k) are given below. After the following n =6 keys have been inserted in the order given, draw the hash table as an array. In each element of the array, write either a key or NULL, as appropriate. Label your indices.
Hint: I recommend you first make yourself a side table i.e. scratch work of some numbers: for each of the keys, calculate the output of h1(k) and h2(k). Then use that to do the actual hash table inserts.
h(k, i)=(h1(k)+ i h2(k))% m
h1(k)= k % m
h2(k)=(k %(m-1))+1
m =7
n =6
Keys to insert: 3,17,6,12,5,20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!