Which of the following is not a technique to avoid a collision?

(a) Make the hash function appear random

(b) Use the chaining method

(c) Use uniform hashing

(d) Increasing hash table size

My question is taken from Hash Tables topic in section Hash Tables of Data Structures & Algorithms I

I got this question by my school teacher while I was bunking the class.

1 Answers

Correct choice is (d) Increasing hash table size

To explain: On increasing hash table size, space complexity will increase as we need to reallocate the memory size of hash table for every collision. It is not the best technique to avoid a collision. We can avoid collision by making hash function random, chaining method and uniform hashing.