2 votes 2 votes While inserting keys 12,44,13,88,23,94,11,39,20,16 and 5 in a 11 item hash table using the hash function $h(i) = (2i+5) \mod 11$, total number of collisions that occur is _________ (On collision no insertion takes place) Algorithms go-alogrithms-1 numerical-answers + – Bikram asked Oct 4, 2016 Bikram 580 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
4 votes 4 votes Hashvalues will be 12 - 29 mod 11 = 7 44 - 93 mod 11 = 5 13 - 31 mod 11 = 9 88 - 181 mod 11 = 5 - collission 23 - 51 mod 11 = 7 - collision 94 - 193 mod 11 = 6 11 - 27 mod 11 = 5 - collision 39 - 83 mod 11 = 6 - collision 20 - 45 mod 11 = 1 16 - 37 mod 11 = 4 5 - 15 mod 11 = 4 - collision So, 5 collisions. Arjun answered Oct 8, 2016 Arjun comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Kapil commented Oct 13, 2016 reply Follow Share No need to follow !! just count the collisions . 0 votes 0 votes Prashant. commented Oct 13, 2016 reply Follow Share m asking when coliisio happed ex: 45 is collide then where to push 45 in hash table, 0 votes 0 votes Arjun commented Oct 14, 2016 reply Follow Share @Anirudh yes, that must have been mentioned in question - otherwise its ambiguous. Added now. 3 votes 3 votes Please log in or register to add a comment.