Question
Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x mod 10, show the resulting: b. Hash table using
Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x mod 10, show the resulting:
b. Hash table using linear probing.
c. Hash table using quadratic probing
The new table size should be the smallest prime that is greater than twice the size of the original table and is of the from 4j + 3, for some j. Assume that the hash function is h(x) = x mod size, where size is the size of the table.
Shouldn't the size be 19 since it is twice the size of the orginal table (7*2=14) and is in the form 4j + 3 form (4(4)+3)?
I got 0[4199]1[4371]2[]3[]4[]5[]6[]7[]8[9679]9[]10[]11[]12[1323]13[4344]14[1989]15[]16[]17[6173]18[] for both b and c.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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