Answer to Question #124442 in Algorithms for kwame john

Question #124442
1. Insert {1, 2, 5, 10, 17, 25, 36, 49} into empty hash table with Table Size = 16 using
a. Linear Probing
b. Quadratic Probing
1
Expert's answer
2020-06-29T08:14:45-0400

Hashing: store data in table slot T[n], where n = Hash(key) = key mod TableSize

Solution a:

ni(x) = (Hash(x) + i) mod TableSize (i=0,1,2,...)

TableSize=16, data={1, 2, 5, 10, 17, 25, 36, 49}



Hash table using linear probing:



 

Solution b:

ni(x) = (Hash(x) + i2) mod TableSize (i=0,1,2,...)

TableSize=16, data={1, 2, 5, 10, 17, 25, 36, 49}



Hash table using quadratic probing:


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS