subject

Assume you have a HashMap class that uses a load factor of 0.75 (regardless of the collision resolution mechanism used), and has an initial array size of 13. The table below contains a list of items, along with associated hashcodes 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: Show what the array of the HashMap would look like after all the items below have been added, assuming the HashMap class uses separate chaining hashing to resolve collisions, and that the threshold is calculated based on the number of items present, not the number of array cells that contain at least one item. Assume the array is resized when the current item to be added will make the total number of items greater than or equal to the threshold value.

Show what the array of the HashMap would look like after all the items below have been added, assuming the HashMap class uses quadratic probing to resolve collisions instead of separate chaining hashing. Assume the array is resized when the current item to be added will make the total number of items greater than or equal to the threshold value.

Note that for both questions, you do not need to compute the hashcodes, you only need to determine where the items would be placed into the underlying array of the HashMap.

Item Hashcode
Patriots 1342415383
Steelers 700056533
Chargers 330628742
Texans 532139483
Packers 217142585
49ers 2112979549
Saints 207265348
Giants 1631149803

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Budgets you to do all of the following expect a) send frivolously b) avoid over spending c) gain financial independence d) examine your priorities and goals
Answers: 2
question
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
question
Computers and Technology, 22.06.2019 20:30
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
You know the right answer?
Assume you have a HashMap class that uses a load factor of 0.75 (regardless of the collision resolut...
Questions
question
English, 15.07.2021 15:20
question
Social Studies, 15.07.2021 15:20
question
Social Studies, 15.07.2021 15:20
question
Arts, 15.07.2021 15:20
question
Mathematics, 15.07.2021 15:20