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
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started