edited by
227 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$
edited by

1 Answer

Best answer
1 votes
1 votes
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
Answer:

Related questions

0 votes
0 votes
1 answer
1
Bikram asked May 26, 2017
464 views
The cost of optimal binary search tree for the identifier set $(a1, a2, a3) =$ (do, if, while) with $p(1) = 0.3, \ p(2) = 0.2, $ $p(3) = 0.15, q (0) = 0.05, q(1) = 0.15...
2 votes
2 votes
2 answers
3
Bikram asked May 26, 2017
343 views
Assume Dijkstra's Algorithm is used to find the shortest paths from node G in the above graph. The total number of edges which are not included in any of the shortest pat...
1 votes
1 votes
2 answers
4
Bikram asked May 26, 2017
456 views
The total number of LCS (Longest Common Subsequences) of $P = abcd123$ and $Q= badc321$ that can be formed are ______.