Answered step by step
Verified Expert Solution
Link Copied!

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++

image text in transcribed

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 table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

Question Can plan participants borrow from a VEBA?

Answered: 1 week ago

Question

Question What is an educational benefit trust and how is it used?

Answered: 1 week ago

Question

Question How are VEBA assets allocated when a plan terminates?

Answered: 1 week ago