Algorithm and Data Structure Assignment3-10-23
Algorithm and Data Structure Assignment3-10-23
Q4) Demonstrate what happens when we insert the keys 5; 28; 19; 15; 20; 33; 12; 17; 10
into a hash table with collisions resolved by chaining. Let the table have 9 slots,
Q5) Consider inserting the keys 10; 22; 31; 4; 15; 28; 17; 88; 59 into a hash table of
length m = 11 using open addressing with the auxiliary hash function h’(k)=k.
Illustrate the result of inserting these keys using
linear probing,
using quadratic probing with c1 = 1 and c2 = 3, and using double hashing with h1(k)=k and
h2(k)= 1 + (k mod (m -1)).