Question: Given the following line of Java code. HashSet mymap = new HashSet ( 2 4 ) ; Let's assume that we are going to insert

Given the following line of Java code.
HashSet mymap = new HashSet(24);
Let's assume that we are going to insert 14 items into an empty HashSet.
Let's assume from our hash function, that each item was mapped to the following respective bucket.
Item 1 mapped to bucket 2.
Item 2 mapped to bucket 12.
Item 3 mapped to bucket 1.
Item 4 mapped to bucket 4.
Item 5 mapped to bucket 5.
Item 6 mapped to bucket 4.
Item 7 mapped to bucket 2.
Item 8 mapped to bucket 2.
Item 9 mapped to bucket 1.
Item 10 mapped to bucket 3.
Item 11 mapped to bucket 6.
Item 12 mapped to bucket 20.
Item 13 mapped to bucket 18.
Item 14 mapped to bucket 15.
After inserting 14 items, what is the current usage of the HashSet?
Type in your answer up to three decimal places and also round up if the 4th decimal place is 5 or higher. For example, if your answer is 1.2345678, then you should type in 1.235.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!