Question: 45
(Choose 1 answer)
Given the division hash function h(x) = x%M, where M = 10 and Collision Resolution
is quadratic probing, i.e. when inserting a key x, the collision is resolved by finding an available position at (h(x)
+ i^2)%M), i=1, 2, ...
How the hash table looks like after inserting the following keys sequentially?
26, 97, 36, 106
A. (1)
B. (2)
C. (3)
D. (4)
0
1
2
3
4
5
012345
36
0123-
0 36
36
1
2
3
106
4
4
5 106
5
106
6
26
6
26
7
97
7
97
61
26
6
26
7
97
7
97
8
26
8
8
8
9
106
9
9
9
(1)
(2)
(3)
(4)