Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a linear probing hash table, all the keys must be rehashed when resizing the array. True False Question 2 Give the array that results

In a linear probing hash table, all the keys must be rehashed when resizing the array.

True
False

Question 2

Give the array that results after inserting the following sequence of 10 keys into an initially empty linear probing hash table.

key hash --- ---- P 0 W 7 L 6 Y 9 H 2 Q 1 C 7 O 9 E 9 U 5 

Assume that the size of the hash table is 10 and that it does not grow or shrink.

Give you answer as a sequence of capital letters separated by spaces.

Question 3

Insert the following sequence of 12 keys, in order, into a separate chaining hash table with 3 chains:

key hash --- ---- S 2 I 1 D 2 H 0 Z 0 K 0 L 1 Y 2 W 0 J 2 T 0 P 2 

Consider a search miss for the key F, whose hash value is 1. What is the sequence of keys that get compared with F? Give your answer as a sequence of capital letters separated by spaces.

Question 4

Suppose that the following keys are inserted into an initially empty linear probing hash table but not necessarily in the order given:

key hash --- ---- A 2 C 4 H 2 L 6 N 1 W 3 Z 6 

Assuming that the size of the hash table is 7 and that it does not grow or shrink, which one or more of the following could be the contents of the resulting array?

N L Z A W C H

C Z H N W A L

L N H W A C Z

L N A H W C Z

H N L W Z A C

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions