This is incorrect, do not use this and expect it to work!
The first trial of the insertion code may have logic in listing 3.
Listing 3: | hashinsertion |
Several aspects of this code are correct. First, the number of values stored should be incremented. Second, we need to mark an entry in the hash table as “used”. Third, we need to copy the value to an entry in the hash table.