1,840 views
3 3 votes
Given the input sequence {11,33,43,79,19} and hash table of size 10 with the hash function h(k)=k mod 10. If hash tables uses quadratic probing,the number of collisions occured while mapping the given sequence is?

1 Answer

2 2 votes

$$\begin{align*} &h(k,i) = \left [ h(k) + i^2 \right ] \text {mod } 10 \end{align*}$$

Where $ i = 0,1,2,3,4....$

• edited by
Position:
Show:

Related questions

60 60 votes
4 answers 4 answers
25.2k
25.2k views
Arjun asked Feb 12, 2020
25,168 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
5 5 votes
3 3 answers
265
265 views
GO Classes asked Jul 18
265 views
A hash table of length $11$ is initially empty. The hash function is:$H(key) = (key \times 3) \bmod 11$Collisions are resolved using quadratic probing:$H_k = (H_0 + k^2) ...
5 5 votes
3 3 answers
7.9k
7.9k views
mcjoshi asked Aug 30, 2016
7,919 views
Keys $9,19,29,39,49,59,69$ are inserted into a hash Table of size $10$ $(0-9)$ using the hash function $H = k mod 10$ and Quadratic Probing is used for collision resoluti...
1 1 vote
1 1 answer
7.7k
7.7k views
Sara asked Jan 7, 2016
7,726 views
Consider a hashing function that resolves collision by quadratic probing .Assume the address space is indexed from $1$ to $6$. Which of the following locations will never...