Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in C++ Hash table with open addressing In this assignment you are requested to implement insert, search, and delete operations for an open-addressing hash table
in C++
Hash table with open addressing In this assignment you are requested to implement insert, search, and delete operations for an open-addressing hash table with double hashing. Create an empty hash table of size m = 13. Each integer of the input will be a key that you should insert into the hash table. Use the double hashing function h(ki) = (h(k) + ih2(k)) mod 13 where h1(k) = k mod 13 and h2(k) 1 + (k mod 11). The input terminates when the key-1 is read (such a key must not be inserted in the hash table). At that point, print the content of the hash table to the screen (see sample input/output below for the printing format). Then, read integers from the input the index of the element in the hash table. If the number is not inside the hash table, print NOT FOUND. Finally, read integers from the input until the number -3 is found (do not process that number). For each number inputted, delete it from the hash table (note that the integer might not be in the table). Once the integer -3 is found, print the hash table. Hash table with open addressing In this assignment you are requested to implement insert, search, and delete operations for an open-addressing hash table with double hashing. Create an empty hash table of size m = 13. Each integer of the input will be a key that you should insert into the hash table. Use the double hashing function h(ki) = (h(k) + ih2(k)) mod 13 where h1(k) = k mod 13 and h2(k) 1 + (k mod 11). The input terminates when the key-1 is read (such a key must not be inserted in the hash table). At that point, print the content of the hash table to the screen (see sample input/output below for the printing format). Then, read integers from the input the index of the element in the hash table. If the number is not inside the hash table, print NOT FOUND. Finally, read integers from the input until the number -3 is found (do not process that number). For each number inputted, delete it from the hash table (note that the integer might not be in the table). Once the integer -3 is found, print the hash tableStep 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