Show the insertion of the key 64 into the hash table T. Assume collision resolut
ID: 3722448 • Letter: S
Question
Show the insertion of the key 64 into the hash table T. Assume collision resolution by chaining using doubly linked lists. Use multiplication method. See image:
Question 5 10 pts Show the insertion of the key 64 into the hash table T below. Assume collision resolution by chaining using doubly linked-lists. Use multiplication method. Assume m -4 and A 3/5. In which slot is the key inserted? How does the linked-list look like after the insertion of the key 64? 70 123 134 46Explanation / Answer
Hash Tanle Multiplication methodd h(k) = [m(kA mod 1] above method is used in multiplication method for finding the h(k) h(k) have value between 0 to m-1 Given m = 4 and A = 3/5 so h(k) = [m(kA mod 1] [4(k*(3/5) mod 1)] we have k = 64 now so h(64) = [m(kA mod 1] = [4(64*(3/5) mod 1)] = [4(192/5 mod 1)] = [4(38.4 mod 1)] = [4(0.4)] = [1.6] So using method we find h(64) = 1.6 We always take floor of fraction value for finding the index in hash table. then h(64) = 1 So after insert 64 at index 1 [0] -> 56 -> 70 [1] -> 34 -> 23 -> 64 [2] -> / [3] -> 46
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.