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 ie no linked list used, no STL application that performs the following.
Creates and uses a dynamically allocated array of "Node" elements ie 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 eg inserting, displaying, etc.
Sizing a new hash table ie size should be first prime number greater than twice number of elements to enter, this guarantees array w lambda
Destroy current table if exist ie deallocation of memory
Inserting an elementDisplaying an elementTerminating application ie release all allocated memory
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
