Question: Question 1. 16 points Consider a hash table with 7 positions and the hash function: h(X)-X mod 7. Keys are inserted in the following order:
Question 1. 16 points Consider a hash table with 7 positions and the hash function: h(X)-X mod 7. Keys are inserted in the following order: 8, 9, 1, 6,2. For each of questions a,b,c you will answer the following questions: i. (1 point) Draw the resulting array 0 i. (0.5 point) How many positions will be probed (i.e. compared with the given key) in order to find the key 2 in the table? Specify the positions probed. ii (0.5 point) How many positions will be probed before the algorithm realizes that the element 5 is not in the table? Specify the positions probed. Note that probing an empty position counts. Answer questions i. i.ii. for each of the following colision resolution techniques: a) Use hashing with linear probing. b) Use hashing with quadratic probing. o) Use double hashing with secondary hash function dis-4 (x mod 3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
