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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
image
Computers and Technology, 23.06.2019 11:30, kieante01
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
image
Computers and Technology, 24.06.2019 10:30, brandon1748
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
image
Computers and Technology, 24.06.2019 15:00, marelinatalia2000
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
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 in other subjects: