Consider a hash table consisting of M=11 slots, and suppose integer key value are hashed into the table using hash function h1:
int h1(int key)
{
x = (key + 5)*(key + 5);
x = x/6;
x = x + key;
x = x%11;
return x;
}
Suppose that collisions are resolved using linear probing. The probe in sequence is given therefore by
h1(k) + i(mod)11
The integer key values listed below are to be inserted, in the order given below. What are the final contents of the hash table after the following key values have been inserted in the given order:
43, 23, 1, 0, 15, 31, 4, 7, 11, 3
Source:- http://www.techtud.com/example/hashing