Answered step by step
Verified Expert Solution
Link Copied!

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 into a

image text in transcribed

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? c. 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago