Question: 4. The objects A to G are inserted in this order, into a hash table. The Hashi and Hash2 values for these objects are: A
4. The objects A to G are inserted in this order, into a hash table. The Hashi and Hash2 values for these objects are: A B C D E F G Hashl: 17 31 6 14 22 4 5 Hash2: 3 9 5 1 3 7 1 Assume that, in all cases, a maximal load factor of 50% is maintained and that the under- lying array has initial capacity of 4 and is doubled in capacity as necessary to maintain the maximal load factor 6) Draw a diagram of the resulting hash table if it is implemented with direct chaining, where Hash1 is used as the hash value of each object. (5 marks) (6) Draw a diagram of the resulting hash table if it is implemented with linear probing, where Hashi is used as the hash value of each object. [5 marks) (iii) Draw a diagram of the resulting hash table if it is implemented with double hashing where Hashl is used as the primary hash value of each object and Hash2 is used as the secondary hash value of each object. (5 marks) a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
