Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!