edited by
3,937 views
3 votes
3 votes

Consider double hashing of the form

$h(k,i)=(h_1(k)+ih_2(k)) \text{mod m}$ where $h_{1}(k) = \text{k mod m} \ , \ \ h_{2}(k)=1+(\text{k mod n})$ where $n=m-1$ and $m=701$. For $k=123456$, what is the difference between first and second probes in terms of slots?

  1. $255$
  2. $256$
  3. $257$
  4. $258$
edited by

2 Answers

2 votes
2 votes

Option c is right. 

0 votes
0 votes

3rd is the correct answer .

1st time key will go to 80th slot , 2nd time key will go to 337th slot

DIFFERENCE =337-80 = 257th slot

 

Answer:

Related questions

2 votes
2 votes
2 answers
1
Arjun asked Jul 2, 2019
1,631 views
Match List-I with List-II:$$\begin{array}{|c|c|c|c|} \hline {} & \text{List-I} & {} & \text{List-II} \\ \hline (a) & \text{Prim’s algorithm} & (i) & O(V^3 \log V) \\ \h...
7 votes
7 votes
3 answers
3
Arjun asked Jul 2, 2019
3,267 views
Which of the following is best running time to sort $n$ integers in the range $0$ to $n^2-1$?$O(\text{lg } n)$$O(n)$$O(n\text { lg }n)$$O(n^2)$
1 votes
1 votes
1 answer
4
Arjun asked Jul 2, 2019
1,849 views
Which of the following is application of depth-first search?Only topological sortOnly strongly connected componentsBoth topological sort and strongly connected components...