Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Pairs.java Pairs.txt This assignment consists of two problems. The first problem does not require coding. All you have to do for this problem is

Problem image text in transcribed
image text in transcribed
image text in transcribed
Pairs.java
image text in transcribed
Pairs.txt
image text in transcribed
This assignment consists of two problems. The first problem does not require coding. All you have to do for this problem is answer the questions and submit a document containing your answers. The second problem requires coding. You must submit a Java file containing your solution for this problem. Problem 1: 10 Points For all the questions assume you have a HashMap class that uses a threshold of 0.75 regardless of the collision resolution mechanism used, and has an initial array size of 13. Assume the array is resized, when the current item to be added will make the load factor greater than or equal to the threshold value. Recall that the load factor is the fraction of a hash map that is full Table 1 contains a list of items, along with associated hash codes 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 1. (5 points) Show what the array of the HashMap would look lke after all the items below 2. (5 points) Show what the array of the HashMap would look like after all the items below Note that for both questions, you do not need to compute the hashcodes, you only need to determine have been added, assuming the HashMap class uses separate chaining to resolve collisions have been added, assuming the HashMap class uses quadratic probing to resolve collisions. where the items would be placed into the underlying array of the HashMap ABLE 1 HASHCODE PAIRS FOR PARY Ite Hashcode r00056533 130628742 532139483 Sarah 142585 11297954 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Perception: Making Sense of Your World

Answered: 1 week ago

Question

1. What are the major sources of stress in your life?

Answered: 1 week ago