Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider an open addressed hash table with double hashing, size m = 7 . The hash function h ( k , i ) and the

Consider an open addressed hash table with double hashing, size m =7. The hash function h(k, i) and the two auxiliary hash functions h1(k) and h2(k) are given below. After the following n =6 keys have been inserted in the order given, draw the hash table as an array. In each element of the array, write either a key or NULL, as appropriate. Label your indices.
Hint: I recommend you first make yourself a side table i.e. scratch work of some numbers: for each of the keys, calculate the output of h1(k) and h2(k). Then use that to do the actual hash table inserts.
h(k, i)=(h1(k)+ i h2(k))% m
h1(k)= k % m
h2(k)=(k %(m-1))+1
m =7
n =6
Keys to insert: 3,17,6,12,5,20

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

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions