Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Build the hash table that results when the keys D , A , T , A , S , T , R , U ,

Build the hash table that results when the keys D, A, T, A, S, T, R, U, C, T, U, R, E, S are inserted in that order into an initially empty table of size 13 using double hashing. Then, answer the questions from 8 to 14 based on your solution.
Use hi(k)= k mod 13 for the first hash function for the kth letter of the English alphabet.
Use ha(k)=1+(k mod 11) for the second hash function.
Hint: You can use the following pre-calculated hash values for the related keys.
21
h2(k)
c u o
8. What are the indexes of 'A's in the hashtable in the order of insertion?
A.)1,3
B.)1,2
C.)1,1
D.)2.1
E.)3, i
9. What are the indexes of 'T's in the hashtable in the order of insertion?
A.)7,1,4
B.7.8.9
C.)7,11,12
D.)7,17.27
E.)10,7,12
10. What are the indexes of 'U's in the hashtable in the order of insertion?
A.)0,8
B.)8.9
C.)8.0
D.)8,11
E.)11,8
11. What are the indexes that have been tried for 'C' until it is put into its final position?
A.)3,2
B.)3,7
C.)3,7,2
D.)3,7,11,2
E.)2,3.7
12. What are the indexes that have been tried for the second 'R' until it is put into its final position?
A.)5,0,8,3,11,6,1,9
B.)0,1,3,5,6,8,9,11
C.)5.1.9,11
D.)5,13,21,9
E.)5,6,0,1,3,11,9
3. What are the indexes that have been tried for 'E' until it is put into its final position?
A.)4,5,10,11
B.)4,11,5,10
C.)5,6,11,10
D.)5,11,4,10
E.)5.11,17,23
. What is the index of the second 'S' in the hashtable?
A.)2
B.)6
C.)9
D.)11
E.) Second S' cannot be inserted into the hashtable.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To build the hash table using double hashing and answer the given questions we can follow the steps ... 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_2

Step: 3

blur-text-image_3

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

Data Structures and Algorithm Analysis in Java

Authors: Mark A. Weiss

3rd edition

132576279, 978-0132576277

More Books

Students also viewed these Programming questions