previous | start | next

Collisions

Now try to insert the fourth pair, (17020, 19), we get a collision:

        hash(14913) = 14913 % 7 = 3
        hash(15930) = 15930 % 7 = 5
        hash(16918) = 16918 % 7 = 6
        hash(17020) = 17020 % 7 = 3
        -----------
        0 null
        1 null
        2 null
        3 (14913, 20) (17020, 19)
        4 null
        5 (15930, 10)
        6 (16918, 50)

     


previous | start | next