Question: question 1) Suppose we use the MAD method for hashing into a hash table with 13 slots with parameters a = 3 and b =

question 1) Suppose we use the MAD method for hashing into a hash table with 13 slots with parameters a = 3 and b = 5. That is, key k is hashed into slot number (3*k + 5) % 13.

Show the placement of the keys after inserting the following keys in the given order into the hash table using separate chaining to handle collisions.

Keys inserted (in order): 8 10 25 2 31 12 5 18 Type in each key on the same line as the index of the slot where it is eventually inserted.

0:

1:

2:

3:

4:

5:

6:

7:

8:

9:

10:

11:

12:

Repeat Question 1 using linear probing to handle collisions.

Keys inserted (in order): 8 10 25 2 31 12 5 18

Type in each key on the same line as the index of the slot where it is eventually inserted.

0:

1:

2:

3:

4:

5:

6:

7:

8:

9:

10:

11:

12:

Question 2 -------------------------------------------------------------------

Repeat Question 1 using quadratic probing to handle collisions. Keys inserted (in order): 8 10 25 2 31 12 5 18 Type in each key on the same line as the index of the slot where it is eventually inserted.

0:

1:

2:

3:

4:

5:

6:

7:

8:

9:

10:

11:

12:

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!