Question: 2 Practice with Hash Tables (24 pts) Hashing with Chaining (a) (6 pts) Fill in the table below after inserting 20, 51, 10, 19, 32,

 2 Practice with Hash Tables (24 pts) Hashing with Chaining (a)

2 Practice with Hash Tables (24 pts) Hashing with Chaining (a) (6 pts) Fill in the table below after inserting 20, 51, 10, 19, 32, 1, 66, 40 (in this order) into an initially empty hash table of size 11 with chaining and h(k)=kmod11. Open Addressing with Linear Probing (b) (6 pts) Fill in the table below after inserting 20, 51, 10, 19, 32, 1, 66, 40 (in this order) into an initially empty hash table of size 11 with linear probing and h(k,i)h(k)=(h(k)+i)mod11=kmod11 1 (c) (3 pts) How many re-hashes after collision are required for this set of keys? Show your work! Open Addressing with Double Hashing (d) (6 pts) Fill in the table below after inserting 20, 51, 10, 19, 32, 1, 66, 40 (in this order) into an initially empty hash table of size m=11 with double hashing and h(k,i)h1(k)h2(k)=(h1(k)+ih2(k))mod11=kmod11=1+(kmod7) (e) (3 pts) How many re-hashes after collision are required for this set of keys? Show your work

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!