Originally Posted by

**brewbuck**
Chaining is only one way of dealing with collisions. Another option is linear probing -- if the hash of the element is H, and the table[H] already exists, then insert it at table[H+1] instead (and if that's filled, go to the next and the next until an empty spot is found).

To generalize linear probe, if table[H] collides, set H = collide(H) and try again. Linear probing means collide(H) = H+1.

Or, multi-hashing. If Hash(element) is H, and H is a collision, then use Hash2(element), and if that collides go to Hash3(element), for as many hash functions as you've got.