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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!