Question: Create a ArrayHashTable class which uses an array with open addressing to store data items. Implement the four different insertion functions listed below, that use

Create a ArrayHashTable class which uses an array with open addressing to store data items. Implement the four different insertion functions listed below, that use linear probing, quadratic probing, pseudo-random probing, and double rehash probing to resolve collisions, respectively.

ERROR_CODE InsertItemLinearProbing (ItemType item, int &collisions)

ERROR_CODE InsertItemQuadraticProbing (ItemType item, int &collisions)

ERROR_CODE InsertItemPseudoRandomProbing (ItemType item, int &collisions)

ERROR_CODE InsertItemDoublerehashProbing (ItemType item, int &collisions)

Write a program that counts the total number of collisions for each rehash function, if inserting in the hash table 100 to array_size instances of random integers (with step of 100).

Plot the number of collisions for each rehash function against the number of instances stored in the hash table, all in the same graph (so we can compare)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!