Question: 11) (6 points) Given a hash table with m=11 entries and the following hash function h1 and step function h2: h1(key) = key mod m
11) (6 points) Given a hash table with m=11 entries and the following
hash function h1 and step function h2:
h1(key) = key mod m
h2(key) = {key mod (m-1)} + 1
Insert the keys {32, 43, 19, 34, 25, 12, 14, 2, 23} in the given order (from left to right) into the hash table using each of the following hash methods:
a.Chaining with h1 h(k) = h1(k)
b.Linear-Probing with h1 h(k,i) = (h1(k)+i) mod m
c.Double-Hashing with h1 as the hash function and h2 as the step function h(k,i) = (h1(k) + ih2(k)) mod m
ChainingLinear ProbingDouble Hashing
0
1
2
3
4
5
6
7
8
9
10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
