(Hashing) a. If h(x) = x mod 7 and separate chaining is used to resolves collisions, what does the hash table look like after the following insertions occur? (load factor = 1, array size = 7) Input data: 9, 12, 16, 8, 2, 0 0   1   2   3   4   5   6   b. Redo part 4.a if linear probing is used to resolve collisions. c. Redo part 4.a if quadratic probing is used to resolve collisions. d. Redo part 4.a if double hashing is used to resolve collisions. Secondary hash function is h2(x) = (7 – x) mod 7 e. Redo part 4.a if double hashing is used to resolve collisions. Secondary hash function is h2(x) = (5 – x) mod 7

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 13RQ: How is an array stored in main memory? How is a linked list stored in main memory? What are their...
icon
Related questions
Question

Answer all parts of the question below:

******************

(Hashing)

a. If h(x) = x mod 7 and separate chaining is used to resolves collisions, what does the hash table look like after the following insertions occur?

(load factor = 1, array size = 7)

Input data: 9, 12, 16, 8, 2, 0

0  
1  
2  
3  
4  
5  
6  

b. Redo part 4.a if linear probing is used to resolve collisions.


c. Redo part 4.a if quadratic probing is used to resolve collisions.


d. Redo part 4.a if double hashing is used to resolve collisions. Secondary hash function is h2(x) = (7 – x) mod 7


e. Redo part 4.a if double hashing is used to resolve collisions. Secondary hash function is h2(x) = (5 – x) mod 7


Please draw your solution and elaborate all the steps.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 12 images

Blurred answer
Knowledge Booster
Hash Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning