edited by
5,848 views
16 votes
16 votes

Consider a hash table of size $11$ that uses open addressing with linear probing. Let $h(k) = k \mod 11$ be the hash function used. A sequence of records with keys

$43 \ 36 \ 92 \ 87 \ 11 \ 4 \ 71 \ 13 \ 14$

is inserted into an initially empty hash table, the bins of which are indexed from zero to ten. What is the index of the bin into which the last record is inserted?

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

4 Answers

Best answer
24 votes
24 votes

$$\begin{array}{|c|c|} \hline \textbf{Index} &  \textbf{key}\\\hline 0 & 87 \\\hline 1 & 11 \\\hline 2 & 13 \\\hline 3 & 36 \\\hline 4 & 92 \\\hline 5 & 4 \\\hline 6 & 71 \\\hline \textbf{7} & \textbf{14} \\\hline 8 \\\hline 9 \\\hline 10 & 43 \\\hline  \end{array}$$

(D) is answer

edited by
8 votes
8 votes

Answer D

Index Key
0 87
1 11
2 13
3 36
4 92
5 4
6 71
7 14
8  
9  
10 43
Answer:

Related questions

42 votes
42 votes
5 answers
2
Ishrat Jahan asked Oct 29, 2014
16,776 views
A binary tree with $n 1$ nodes has $n_1$, $n_2$ and $n_3$ nodes of degree one, two and three respec­tively. The degree of a node is defined as the number of its neighbo...
32 votes
32 votes
2 answers
3
Ishrat Jahan asked Oct 29, 2014
12,455 views
How many distinct BSTs can be constructed with $3$ distinct keys?$4$$5$$6$$9$