Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:50, ashiteru123
What is the difference between windows 7 and windows 10?
Answers: 1
image
Computers and Technology, 23.06.2019 12:30, umimgoingtofail
What is the difference between the internet and the world wide web?
Answers: 1
image
Computers and Technology, 23.06.2019 23:30, huangjianhe135
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, kayranicole1
What shows the web address of the page that is currently displayed in the workspace? status window toolbar location bar internet box
Answers: 1
Do you know the correct answer?
Assume you have a HashMap class that uses a load factor of 0.75 (regardless of the collision resolut...

Questions in other subjects:

Konu
Mathematics, 15.11.2019 03:31
Konu
Mathematics, 15.11.2019 03:31