Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Consider a hash table of size 11 with hash function h(x)=(11x+4)mod11. Draw the table that results after inserting, in the given order, the following

image text in transcribed

a) Consider a hash table of size 11 with hash function h(x)=(11x+4)mod11. Draw the table that results after inserting, in the given order, the following values: 65,13,49, 27,89,32,46,73,33 for each of the three scenarios below: i. When collisions are handled by separate chaining; (5 marks) ii. When collisions are handled by linear probing; (5 marks) iii. When collisions are handled by double hashing using a second hash function h(x)=(xmod9)+1. Hint, the overall (combined) hash function is H(x)= (h(x)+ih(x))mod11, where i=0,1,2,3, (5 marks) iv. When collisions are handled by quadratic probing with a quadratic probe function h(x,i)=(h(x)+0.5i+0.5i2)mod11 where i=1,2,3,. (5 marks) b) What would be the contents of queue Q1 after the following code is executed and the following data are entered? The data are 23,47,29,0,69,32,13,47,28,12,76,0,34,69,5,69, 84, 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions