Answered step by step
Verified Expert Solution
Question
1 Approved Answer
7. The keys 28, 5, 15, 19, 10, 17, 33, 12, 20, 6, 9, 23, 34, 22 and 21 are to be inserted in order
7. The keys 28, 5, 15, 19, 10, 17, 33, 12, 20, 6, 9, 23, 34, 22 and 21 are to be inserted in order into a hash table of length 9. a. Suppose that collisions are to be resolved by chaining, with insertions performed at the head of each list. The hash function is h(k)- k mod 9. Show the state of the hash table after all insertions are performed, i.e. draw the array and the linked lists which result b. Referring to part (a), what is the load factor a? How many collisions are there? Show the result of inserting the same keys into a hash table of length 9 where collisions are resolved by open addressing, with hash function: h(k,i)-(k mod 9 + 5i) mod 9. Note that in this case there are more keys than slots, so you won't be able to insert all the keys. Just insert the keys in the given order until there is no more room in the table. Again draw a picture of the array and its contents c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started