Question: Problem Pairs.java Pairs.txt This assignment consists of two problems. The first problem does not require coding. All you have to do for this problem is
This assignment consists of two problems. The first problem does not require coding. All you have to do for this problem is answer the questions and submit a document containing your answers. The second problem requires coding. You must submit a Java file containing your solution for this problem. Problem 1: 10 Points For all the questions assume you have a HashMap class that uses a threshold of 0.75 regardless of the collision resolution mechanism used, and has an initial array size of 13. Assume the array is resized, when the current item to be added will make the load factor greater than or equal to the threshold value. Recall that the load factor is the fraction of a hash map that is full Table 1 contains a list of items, along with associated hash codes that were computed using some hypothetical hash function. Assume the items are added to a newly created instance of the HashMap class in the same order in which they are listed in the table. Based on this information, answer the following questions 1. (5 points) Show what the array of the HashMap would look lke after all the items below 2. (5 points) Show what the array of the HashMap would look like after all the items below Note that for both questions, you do not need to compute the hashcodes, you only need to determine have been added, assuming the HashMap class uses separate chaining to resolve collisions have been added, assuming the HashMap class uses quadratic probing to resolve collisions. where the items would be placed into the underlying array of the HashMap ABLE 1 HASHCODE PAIRS FOR PARY Ite Hashcode r00056533 130628742 532139483 Sarah 142585 11297954 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
