edited by
2,543 views
4 votes
4 votes

A hash table with $10$ buckets with one slot pet per bucket is depicted here. The symbols, $S1$ to $S7$ are initially entered using a hashing function with linear probing. The maximum number of comparisons needed in searching an item that is not present is

$$\begin{array}{|c|c|} \hline 0 & S7 \\ \hline 1 & S1 \\ \hline 2 &  \\ \hline 3 & S4 \\ \hline 4 & S2 \\ \hline 5 &  \\ \hline 6 & S5 \\\hline 7 &  \\ \hline 8 & S6 \\\hline 9 & S3 \\ \hline \end{array}$$

  1. $4$
  2. $5$
  3. $6$
  4. $3$
edited by

2 Answers

Best answer
5 votes
5 votes
Ans is 5.Because in worst case we have to probe index 8,9,0,1 and 2 as they are contiguously filled.
selected by
Answer:

Related questions

2 votes
2 votes
1 answer
2
0 votes
0 votes
1 answer
3
Ray Tomlinson asked Aug 9, 2023
527 views
Numerical Answer Type Que?(please Try to give some ahortcut trick also or important concept is there to solve that question )