1.

How is a bit vector better compared to a normal array for implementing the hash table?(a) It saves time(b) It saves space(c) It saves both time and space(d) It reduces code complexityMy query is from Direct Addressing Tables in portion Hash Tables of Data Structures & Algorithms IThis question was posed to me at a job interview.

Answer»

Correct option is (B) It saves SPACE

The best I can EXPLAIN: A bit vector is an array of BITS of only 0s and 1s, a bit vector of length m takes much less space than an array of m pointers. The complexity to implement bit vector is larger than in normal case.



Discussion

No Comment Found

Related InterviewSolutions