hing) a. If h(x) = x mod 7 and separate chaining is used to resolves collisions, what does the hash table look like after the following insertions occur? (load factor = 1, array size = 7) Input data: 9, 12, 16, 8, 2, 0 0 1 2 3 4 5 6
___________________________________________
(Hashing)
a. If h(x) = x mod 7 and separate chaining is used to resolves collisions, what does the hash table look like after the following insertions occur?
(load factor = 1, array size = 7)
Input data: 9, 12, 16, 8, 2, 0
0 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 |
b. Redo part 4.a if linear probing is used to resolve collisions.
c. Redo part 4.a if quadratic probing is used to resolve collisions.
d. Redo part 4.a if double hashing is used to resolve collisions. Secondary hash function is h2(x) = (7 – x) mod 7
e. Redo part 4.a if double hashing is used to resolve collisions. Secondary hash function is h2(x) = (5 – x) mod 7
Please draw your solution and elaborate all the steps.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 8 images