in Algorithms edited by
248 views
0 votes
0 votes

A hash table of length $7$ uses open addressing with hash function $h(k) = k \text{mod }7$ and linear probing to resolve collisions.

After inserting 6 values in an empty hash table, the table is shown below:

$\begin{array}{|c|c|} \hline 0 & 49 \\ \hline 1 & 35 \\ \hline 2 & 28 \\ \hline 3 & 16 \\ \hline 4 & {} \\ \hline 5 & 75 \\ \hline 6 & 89 \\ \hline \end{array}$

Which of the following insertion sequences can’t result in the above table ?

  1. $49,35,75,89,28,16$
  2. $49,28,35,16,75,89$
  3. $75,49,35,89,28,16$
  4. $49,35,28,75,16,89$
in Algorithms edited by
by
248 views

4 Comments

@Bikram sir, it was looking fine here before too. But it was not well formatted in exam environment...  
now both are fine. :)
0
0

Ahwan

Can you check it now in exam environment and let me know how it is ? and also write answer .

0
0
I have checked the examination environment. Now it is fine.  Let me answer this :)
1
1

1 Answer

1 vote
1 vote
Best answer
Option B:
0 49
1 28
2  
3  
4  
5  
6  


After it we need not check more.  At slot 1, 28 will stay so Option B cant result as the above table.

selected by
by
Answer:

Related questions