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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

assume you have a HashMap class that uses a threshold of 0.75 (75%),
regardless of the collision resolution mechanism used, and has an initial array size of 13. You may assume the array is resized when the current item to be added will make the load factor greater than or equal to the threshold. Recall that the load factor is the fraction of a hash map that is full. If the array is to be resized, assume the array doubles in size and adds one (2 * size + 1).
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

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
Transcribed Image Text: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
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education