1.

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 sizeMy question is taken from Hash Tables topic in section Hash Tables of Data Structures & Algorithms II got this question by my school teacher while I was bunking the class.

Answer» 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.


Discussion

No Comment Found

Related InterviewSolutions