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?
65, 76, 96, 205
A. (1)
B. (2)
C. (3)
D. (4)
0
0 205
1
205
1
2
2
3
3
4
4
01234
0
1
2
3
4
5
65
5
65
5
65
5 65
6
76
6
76
6
76
6
76
7
7
96
7
96
7
96
8
96
8
8 205
8
9
9
9
9
205
(1)
(2)
(3)
(4)