Question: Problem 1 Consider a hash table forwhich collisions are handled by chainingusing single-linked lists. The keys are integers. The table size is 10. The hash

Problem 1

Consider a hash table forwhich collisions are handled by chainingusing single-linked lists. The keys are integers. The table size is 10. The hash function is h(key) = key % 10. Determine the contents of the hash table AFTER the following sequence of integers have been inserted: 12,44,13,67,23,90,11,25,21, and45. Listthe table index followed by the chain of keys with the newest key listed first. That is,

0 : 90

1: 11, 21

etc

Problem 2

Consider a hash table for which collisions are handled by open addressing based on quadratic probing. The hash function is h(key) = key%23. For each integer key in the sequence 12,44,13,67,23,90,11,25,21, and 45, list the key and the set of table indices tested until insertion is successful. That is:

12 : 12

44 : 21

13 : 13

67 : 21, 22

etc

Note the format of this listing is DIFFERENT from the one in problem 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!