Create two hash tables with size 211, one for Quadratic Probing and the other fo
ID: 3761074 • Letter: C
Question
Create two hash tables with size 211, one for Quadratic Probing and the other for Double Hashing. The hash function h is defined as h(k) = k mod M.
Instead of using the quadratic function, write a variant of the quadratic function f(i) = c1*i + c2*i2, where c1, and c2 are parameters with the following three combinations;
Case 1: c1=1, c2=0.
Case 2: c1=0, c2=1
Case 3: c1=1, c2=25
You will test your program with each combination above to see the cases that improve performance.
Write a double hashing function g(k) = R – k mod R, where R = 113
Use command line arguments in the following order; M, R, c1, and c2.
There is no guarantee of finding an empty slot for Quadratic Probing and Double Hashing. So, you can define the limit of probes with a large number if necessary.
using c++ language and program for quadratic probing and double hashing using the aove instructions