'separate chaining vs linear probing vs coalesced hashing

Given a hash table of size 10, and the following hash function

h(n) = n%10

Show the resulting hash tables after inserting the following values with separate chaining, linear probing, and coalesced hashing strategies.

20, 35, 16, 40, 45, 25, 32, 37, 22, 55

Which method works better for these values and why?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source