Item Hash code Ellie 1324606073 John 278195619 Sarah 1460449349 David 437601659 Karen 1290184204 Ronald 1306975744 Tom 2125355666 Tim 673057863 Mike 1334117090 Josh 1460128455 Table Continues On Next Page Claire 31303215 Marin 764701412
assume you have a HashMap class that uses a threshold of 0.75 (75%),
regardless of the collision resolution
Table 1 contains a list of items and their associated hash codes that were computed with 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, show what the array of the HashMap would look like after all the items have been added using both of the following
hash collision resolution techniques.
1. Separate chaining
2. linear probing
Provide 2 arrays(one for each problem). One that uses separate chaining
and another that uses linear probing. Keep in mind as well that you do not need to compute the hash
codes as they are given to you. The hash codes in the following table are given as integer values.
Item Hash code
Ellie 1324606073
John 278195619
Sarah 1460449349
David 437601659
Karen 1290184204
Ronald 1306975744
Tom 2125355666
Tim 673057863
Mike 1334117090
Josh 1460128455
The arrays should be 0 based indexed


Step by step
Solved in 2 steps









