3 votes 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? DS hashing data-structures + – firki lama asked Jan 17, 2017 firki lama 1.1k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply dd commented Jan 17, 2017 reply Follow Share answer ? I found 2 1 votes 1 votes firki lama commented Jan 17, 2017 reply Follow Share @debashish anwer is given 6... 0 votes 0 votes dd commented Jan 25, 2017 reply Follow Share no loop prob is limited to size of the hash array 0 votes 0 votes Please log in or register to add a comment.
2 votes 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....$ dd answered Jan 17, 2017 edited Jan 17, 2017 by dd dd comment Share Follow See all 4 Comments See all 4 4 Comments reply firki lama commented Jan 17, 2017 reply Follow Share @debashish if we follow cormen(page no-272 3rd edition) quadrating probing equation h(k,i)=(h'(k)+c1i+c2i2)mod m where i=0,1,2......m-1...then it will enter into loop 0 votes 0 votes dd commented Jan 17, 2017 reply Follow Share does the QS provide c1 c2 ??? 0 votes 0 votes firki lama commented Jan 17, 2017 reply Follow Share @debashish yes values are not given..and neither given in cormen but in MADE EASY coaching algorithm teacher used to take c1=1 and c2=1 values for solving question.... 1 votes 1 votes dd commented Jan 17, 2017 reply Follow Share ok lets see ...how many then ... 0 votes 0 votes Please log in or register to add a comment.