+1 vote
in Data Structures & Algorithms I by (88.2k points)
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 Answer

+1 vote
by (672k points)
selected by
 
Best 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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...