Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN C++ Hash Table with Linear Probing Create a template called HashTable in a file called hashtable.h that implements the following functionality. You can choose
IN C++
Hash Table with Linear Probing Create a template called HashTable in a file called hashtable.h that implements the following functionality. You can choose any hash function but choose one that minimizes collisions Function Constructors Destructors void print() bool insert (elemType) elemType search (elemType) Removes element from the list Description Decide if you need to use any parameters Especially required if you use dynamic memory management Prints the elements of the hash table on the console Inserts an element into the hash table. Returns false if key already exists Your template should have a field called HTSize that stores the size of the hash table. The elements of the hash table need to be stored as an array. You can choose to use the arrayList template from lab 3. The insert and search functions need to use linear probing. Hashing with Chaining Create a new template called HashTableChaining in a file called hashtablechaining.h with the same functionalities as above. The elements of the array storing the hash table need to be pointers to inked lists. You may use the linked list template from lab 3. Hash Table with Quadratic Probing For 10 bonus points, implement hash table with quadratic probing. Create a template called HashTableQuad in a file called hashtablequad.h that implements the same functionality as HashTable but uses quadratic probing. Hash Table with Linear Probing Create a template called HashTable in a file called hashtable.h that implements the following functionality. You can choose any hash function but choose one that minimizes collisions Function Constructors Destructors void print() bool insert (elemType) elemType search (elemType) Removes element from the list Description Decide if you need to use any parameters Especially required if you use dynamic memory management Prints the elements of the hash table on the console Inserts an element into the hash table. Returns false if key already exists Your template should have a field called HTSize that stores the size of the hash table. The elements of the hash table need to be stored as an array. You can choose to use the arrayList template from lab 3. The insert and search functions need to use linear probing. Hashing with Chaining Create a new template called HashTableChaining in a file called hashtablechaining.h with the same functionalities as above. The elements of the array storing the hash table need to be pointers to inked lists. You may use the linked list template from lab 3. Hash Table with Quadratic Probing For 10 bonus points, implement hash table with quadratic probing. Create a template called HashTableQuad in a file called hashtablequad.h that implements the same functionality as HashTable but uses quadratic probingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started