# Two Techniques Collision Handling Hash Tables Chaining Open Addressing Q29854081

There are two techniques in collision handling in hashtables (chaining and open addressing). a) Briefly explain the difference between the two technique b) Suppose that we have the hash function h(k) = k mod i l and perform following insert operations. Draw the hash table after following operations insert ki-13 Insert k2 = 22 Insert = 8 insert k4-14 c) Hashing with open addressing, Linear Probing Suppose that we have the following hash function: h(k, i) (h(k) + i) mod 5 1-0, 1,2, ,and h,(k) = k mod 5 Insert ki 7 Insert k2-6 Insert ks 11 Show the hash table after performing above inserts (clearly show your work) Show transcribed image text a) Briefly explain the difference between the two technique b) Suppose that we have the hash function h(k) = k mod i l and perform following insert operations. Draw the hash table after following operations insert ki-13 Insert k2 = 22 Insert = 8 insert k4-14 c) Hashing with open addressing, Linear Probing Suppose that we have the following hash function: h(k, i) (h(k) + i) mod 5 1-0, 1,2, ,and h,(k) = k mod 5 Insert ki 7 Insert k2-6 Insert ks 11 Show the hash table after performing above inserts (clearly show your work)

0 replies