How is a bit vector better compared to a normal array for implementing the hash table?

Category: QuestionsHow is a bit vector better compared to a normal array for implementing the hash table?
Editor">Editor Staff asked 1 month ago

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 complexity
 
My query is from Direct Addressing Tables in portion Hash Tables of Data Structures & Algorithms I
 
This question was posed to me at a job interview.

1 Answers
Editor">Editor Staff answered 1 month ago

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.