Question
The code must be done in C++. Please read the question very carefully and write just according to the question.I repet exactly according to the
The code must be done in C++. Please read the question very carefully and write just according to the question.I repet exactly according to the question.
3. [27 points] The hash table array has capacity of 10. Capacity is the number of slots present in the array that is used to build the hashtable. The hash function returns the absolute value of the key mod the capacity of the hash table.
a) Insert these keys in the hash table: 3,23,11,21,1,7,77,8 where the hash table uses quadratic probing to resolve collisions.
b) Search and Delete 3 and 11 from the table. Be careful about changing the status of the table slot to deleted after deleting each item.
c)Search 23 and 21 from the table and print their position.
Hint and help:
- You can use and modify the code provided for hash table in the class to solve your problem.
- Please write the full code in answer script here.
- If you only copy the class code without answering the question you will not get any marks.
- You have to write all three parts (a), (b) and (c) in one code under one main function.
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