April 2018
Intermediate to advanced
322 pages
6h 57m
English
Before we apply the HashTable ADT using the separate chaining technique to the code, let's see how a separate chaining technique works to handle collisions. First, we have phone number 434, owned by Dylan. The phone number will generate 0 for the hash key, so the data will be stored in cell 0. Next is phone number 391, owned by Dominic, which will be stored in cell 6. Phone number 806, owned by Adam in cell 1; phone number 117, owned by Lindsey in cell 5; phone number 548, owned by Cameron in cell 2; and phone number 669, owned by Terry in cell 4.
By now, everything has been running well, since no collision has occurred; however, if we store the 7th data to the hash ...