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

We consider using the hash function h(n)-n mod 8 with k-3 (using 3 bits to repre

ID: 3916313 • Letter: W

Question

We consider using the hash function h(n)-n mod 8 with k-3 (using 3 bits to represent the key after hashing) for inserting the following integer keys: 18, 23, 28, 37. According to the resulting extensible hash table in the figure, which of the following option is possible? On top of the result we have in the figure, if we continue to delete 20 and 15, how many bucket(s) will we have in the end? A 1 01 10 2 D 2 (a) A-18, B-28, C-37, D-23. One bucket in the end. (b) A-18, B-28, C-37, D-23. Two buckets in the end. (c) A-28, B- 37, C 23, D- 18. Two buckets in the end.

Explanation / Answer

Answer : B

1) 18 mod 8 = 2

=> 01 0


2) 23 mod 8 = 7
=> 11 1  

3) 28 mod 8 = 4
=> 10 0

4) 37 mod 8 = 5
=> 10 1


IF WE Map the Table we get :

A = 18
B = 28
C = 37
D = 23

We can see in the figure that Two Buckets are EMpty

Hence Answer is (B)


THANKS, PLEASE UPVOTE if helpful

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