In a double hashing scheme, \(h_1(k) = k \bmod 11\) and \(h_2(k) = 1 + (k \bmod 7)\) are the auxiliary hash functions. The size \(m\) of the hash table is 11. The hash function for the \(i\)-th probe in the open address table is \([h_1(k) + i\,h_2(k)] \bmod m\). The following keys are inserted in the given order: 63, 50, 25, 79, 67, 24.
The slot at which key 24 gets stored is ___________. (Answer in integer)
Answer
10 to 11
Explanation
The first five keys go to their home slots \(h_1(k)\) with no collision: 63 → 8, 50 → 6, 25 → 3, 79 → 2, 67 → 1.
For 24: \(h_1(24) = 2\), which is taken by 79, and \(h_2(24) = 1 + (24 \bmod 7) = 4\).
- \(i = 1\): \((2 + 4) \bmod 11 = 6\), taken by 50.
- \(i = 2\): \((2 + 8) \bmod 11 = 10\), free.
So 24 is stored in slot 10, with slots numbered 0 to 10. The key also accepts 11, the same slot counted from 1.
Answer: 10