Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose we are inserting strings into a hash table of size 9. Suppose we have tw

ID: 3574716 • Letter: S

Question

Suppose we are inserting strings into a hash table of size 9. Suppose we have two hash functions, h, and h2. The hash values for certain strings of these functions are shown in the table below: Fill in the hash table below assuming that we are using open-address, linear-probing style hashing, given that the table starts as it appears below, the hash function is h_1 and the order of insertion is "Fred", "Chloe", "Adam", "Rebecca" and "Reggie". Fill in the hash table below assuming that we are using open-address, double-hashing style hashing, given that the table starts as it appears below, the primary hash function is h_1, the secondary hash function is h_2, and the order of insertion is "Fred', "Chloe", "Adam", "Rebecca" and "Reggie".

Explanation / Answer

1.

When filled in ordered mentioned, we get table as above. Linear Probed values are marked in bold.

2.

When filled in ordered mentioned, we get table as above. Values where secondary hash function is required, are marked in bold.

0 1 2 3 "Bartholomew" 4 "Fred" 5 "Chloe" 6 "Adam" 7 "Rebecca" 8 "Reggie"
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote