Question: 2. (15 points) Problem 2: Hash Table Evaluation. Using Java, create a hash table class called MyHashTable using an array of starting size 10. Implement
2. (15 points) Problem 2: Hash Table Evaluation. Using Java, create a hash table class called MyHashTable using an array of starting size 10. Implement an insert method with the following characteristics: - Takes as input a key-value pair (k,v), where k is an arbitrary integer, then hashes it into the table. You can use any compression function of your choice. - Uses linear probing to resolve collisions. - When the table is full, double the size of the array and re-hash the elements. Create a loop to insert 100,000 elements into the hash table and output the time it takes for the insert function to complete after every insertion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
