Question: Create an array based hash table ( i . e . , no linked list used, no STL ) application that performs the following. Creates

Create an array based hash table (i.e., no linked list used, no STL ) application that performs the following.
Creates and uses a dynamically allocated array of "Node" elements (i.e., structure consisting of a pointer to string key and pointer to a Circle object)
Creates and uses a hash function, "MyHasher" that will generate the index for elements in the array
A string of lowercase letters will be the key. The index will be calculated based on summing the letter integer values "mod" size of the array.A linear probing technique will be used for collisions (refer to textbook)
Creates and uses a function, "InsertElement", that inserts a Circle into the array using a string as the key (that will generate the integer index by hashing & collision conflict resolution). Error message returned if the array is full.
Creates and usesa function, "DisplayElement", that retrieves an element from the array using a string as the key (that will generate the integer index, by hashing & collision conflict resolution).
Displays a menu for user to access all features including (e.g., inserting, displaying, etc.)
Sizing a new hash table (i.e., size should be first prime number greater than twice number of elements to enter, this guarantees array w/ lambda <=.5)
Destroy current table if exist (i.e., deallocation of memory)
Inserting an elementDisplaying an elementTerminating application (i.e., release all allocated memory)

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 Programming Questions!