Question
PLEASE I NEED THIS CODE AS SOON AS POSSIBLE. Please follow the instruction carefully. To complete this task, you will need to follow these steps:
PLEASE I NEED THIS CODE AS SOON AS POSSIBLE.
Please follow the instruction carefully. To complete this task, you will need to follow these steps:
Create 3 arrays of size 1000, and fill them with random data.
Create 3 instances of the AVLChainingHashTable class, one for each data array.
Insert each data array into the corresponding hash table using linear probing, linked-list chaining, and BST chaining.
Generate 100 random numbers for searching, and search for them in each hash table.
Keep track of the number of collisions and the number of searches for each search operation.
Calculate the average number of searches for each data array and insertion method.
Compare the results and determine which insertion method performed the best in terms of the number of collisions and the number of searches.
It's important to note that the Hash function should be optimal in terms of the number of collisions and the size of the hash table should be efficient in terms of space. Additionally, the data that you are inserting should not be consecutive.
In C++,Don't use external libraries and also don't use built-in-Function Just use #include
Hashing Rule: For size, avoid the powers of 2 and numbers close to the multiple of 10. Use the Prime number for the size of a hash table (Recommended).
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