Question: QUESTION 1 (20 marks) a. What is Hashing? [1 marks] b. Use the following values to answer the questions bellow: 10, 22, 31, 4, 15,
QUESTION 1 (20 marks) a. What is Hashing? [1 marks] b. Use the following values to answer the questions bellow: 10, 22, 31, 4, 15, 28, 17, 88, 59 i. Store the values into a hash table with size m = 11, using modulo-division (key % m) as hash function and the linear probing method for resolving collisions. [3 marks] ii. Store the values into a hash table with size m = 11, using modulo-division (key % m) as hash function and the quadratic probing method for resolving collisions. [4 marks] iii. Store the values into a hash table with m = 11, using double hashing as method of collision resolution. Use modulo-division (key % m) as hash function and with h2(key) = 1 + (key mod (m - 1)) as double hashing function. [4 marks] iv. Store the values into a hash table that uses the hash function key % 5 to determine into which of the five chains to put the value. [3 marks] v. What is clustering in a hash table? Discuss the efficiency of the four hashing techniques for minimizing clustering. [5 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
