edited by
1,172 views
2 2 votes
The given input sequence is $\{ 111, 333 , 243, 199, 234, 279, 119 \}$ and the hash table is of size $10$ with hash function $h(k) = k \mod 10$. When hash table uses quadratic probing with $h'(k)=  h(k) + c_1 * i + c_2 * i^2, c_1 = 0, c_2 = 1$, the total number of collisions happening while mapping the given input sequence are __________.

1 Answer

Best answer
5 5 votes
0 279
1 111
2  
3 333
4 243
5 234
6  
7  
8 119
9 199

insert 111, 333 does not have any collision

insert 243 have one collision at index 3

insert 199 does not have any collision

insert 234 have one collision at index 4

insert 279 have one collision at index 9

insert 119 have three collision at index 9,0,3 

selected by
Answer:
Position:
Show:

Related questions

59 59 votes
4 answers 4 answers
24.9k
24.9k views
Arjun asked Feb 12, 2020
24,901 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...
0 0 votes
1 answers 1 answer
760
760 views
Bikram asked May 26, 2017
760 views
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 h...