Consider a hash table of size 11 with hash function h(x) = x mod 11. Draw the tablethat results after inserting, in the given order, the following values: 26, 57, 40, 50,13, 33, and 72 for each of the three scenarios below: i. When collisions are handled by separate chaining. ii. When collisions are handled by double hashing using a second hash function ℎ’(?) = (? ??? 7) + 1. Hint, the overall (combined) hash function is ?(?) = ( ℎ(?) + ? × ℎ′(?) ) ??? 11, where i = 0, 1, 2, 3, … iii. When collisions are handled by quadratic probing with a quadratic probe function ℎ′(?,?) = (ℎ(?) + 0.5 ? + 0.5 ?2) ??? 11 where ? = 1, 2, 3,….
Consider a hash table of size 11 with hash function h(x) = x mod 11. Draw the tablethat results after inserting, in the given order, the following values: 26, 57, 40, 50,13, 33, and 72 for each of the three scenarios below:
i. When collisions are handled by separate chaining.
ii. When collisions are handled by double hashing using a second hash function ℎ’(?) = (? ??? 7) + 1. Hint, the overall (combined) hash function is ?(?) = ( ℎ(?) + ? × ℎ′(?) ) ??? 11, where i = 0, 1, 2, 3, …
iii. When collisions are handled by quadratic probing with a quadratic probe function ℎ′(?,?) = (ℎ(?) + 0.5 ? + 0.5 ?2) ??? 11 where ? = 1, 2, 3,….
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images