Question: 3. 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)

3. 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 {22, 1, 13, 11, 24, 33, 18, 42, 31} in the given order (from left to right) to 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, ) = (h1(k) + ih2(k)) mod m Hash Table Chaining Linear Probing Double Hashing 0 1 WIN 4 5 6 7 8 9 10
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
