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?
34, 65, 94, 204
A. (1)
B. (2)
C. (3)
D. (4)
012345
0
0
1
1
2
2
204
3
204
3
4
34
4
34
5
65
5 65
6
7
8
9
94
(1)
6789
61
204
34
65
0
1
2345
6
७
34
65
94
7
7
8
94
8 94
9
9
204
(2)
(3)
(4)