Question
c++ Create a class called HashTable This class will implement hashing on an array of integers Make the table size 11 Implement with linear probing.
c++
Create a class called "HashTable" This class will implement hashing on an array of integers Make the table size 11 Implement with linear probing. The hash function should be: h(x) = x % 11 Create search(), insert() and delete() member functions. Search should return the index of where the target is located, insert should allow the user to insert a value, and delete removes the desired value from the table. In main perform the following: 1. Insert: 17 11 5 20 10 22 33 45 2. Print out the contents of the hash table (hint: I would make a member function for this) 3. Search for 11, then search for 45 and then search for 26 4. Delete 11 5. Search for 33 Every time you search for something, output it to the console. Include the console output as either as a comment in your main.cpp or as a separate text file. Do not submit console output as comment on Canvas. Submit all files used. Failure to follow submission instructions will result in an automatic -2.
Step 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