5,576 views
5 votes
5 votes

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 resolution. What is the index into which 59 will be inserted ?

$a). 3$

$b). 6$

$c). 8$

$d). 5$

3 Answers

10 votes
10 votes

Given Element={9,19,29,39,49,59,69}

9%10=9

19%10=9=>9+1^2=10=>10%10=0

29%10=9==>9+1^2=10==>10%10=0==>9+2^2=13==>13%10=3

39=>9+3^2=18=>18%10=8

49=>9+4^2=25%10=5

59=>9+5^2=34%10=4

69=>9+6^2=45%10=5==>9+7^2=58=>58%10=8=>9+8^2=73%10=3=>9+9^2=90%10=0

Here no where we have location for 69...though for 59 it is 4 

Related questions

3 votes
3 votes
1 answer
1
firki lama asked Jan 17, 2017
1,158 views
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 o...
1 votes
1 votes
0 answers
4
ankitgupta.1729 asked Nov 9, 2017
1,033 views