GATE 2020 CS – Question 33
Consider a double hashing scheme in which the primary hash function is $h_1(k)=k \bmod 23$, and the secondary hash function is $h_2(k)=1+(k \bmod 19)$. Assume that the table size is 23. Then the address returned by probe 1 in the probe sequence (assume that the probe sequence begins at probe 0) for key value $k=90$ is ______.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 13 to 13
Explanation
$h_1(90)=90 \bmod 23=21$ and $h_2(90)=1+(90 \bmod 19)=1+14=15$. Probe 1 = $(21+15)\bmod 23 = 13$.