4.* 10 Jaivia) Hash Tables with Probing. Consider a hash table of size M = 11 and suppose our keys are non-negative integers. The hash function that is used by our hash table is the following: int h(int key) { int x - (key + 7) * (key + 7); x - x / 16; x - x + key; x = x % 11; return x; } Suppose that collisions are resolve via linear probing. The integer key values listed below are to be inserted in the order given in the table. Show the initial slot (the slot to which the key hashes, before any probing), the probe sequence (if any) for each key, and the final contents of the hash table after the following key values have been inserted in the given order (show your work): Key Value 43 Initial Slot Probe Sequece 23 1 15 31 4. 11 Final Hash Table: Slot 3 4 6. 7 8 9 10 Key

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
4.* 10 Jaivia) Hash Tables with Probing. Consider a hash table of size M = 11 and
suppose our keys are non-negative integers. The hash function that is used by our hash table
is the following:
int h(int key) {
int x - (key + 7) * (key + 7);
x - x / 16;
x - x + key;
x = x % 11;
return x;
}
Suppose that collisions are resolve via linear probing. The integer key values listed below are
to be inserted in the order given in the table. Show the initial slot (the slot to which the key
hashes, before any probing), the probe sequence (if any) for each key, and the final contents
of the hash table after the following key values have been inserted in the given order (show
your work):
Key Value
43
Initial Slot
Probe Sequece
23
1
15
31
4.
11
Final Hash Table:
Slot
3
4
6.
7
8
9 10
Key
Transcribed Image Text:4.* 10 Jaivia) Hash Tables with Probing. Consider a hash table of size M = 11 and suppose our keys are non-negative integers. The hash function that is used by our hash table is the following: int h(int key) { int x - (key + 7) * (key + 7); x - x / 16; x - x + key; x = x % 11; return x; } Suppose that collisions are resolve via linear probing. The integer key values listed below are to be inserted in the order given in the table. Show the initial slot (the slot to which the key hashes, before any probing), the probe sequence (if any) for each key, and the final contents of the hash table after the following key values have been inserted in the given order (show your work): Key Value 43 Initial Slot Probe Sequece 23 1 15 31 4. 11 Final Hash Table: Slot 3 4 6. 7 8 9 10 Key
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