What is direct addressing?

Category: QuestionsWhat is direct addressing?
Editor">Editor Staff asked 4 weeks ago

What is direct addressing?
 
(a) Distinct array position for every possible key
 
(b) Fewer array positions than keys
 
(c) Fewer keys than array positions
 
(d) Distinct array positions for keys based on priority
 
Question is from Direct Addressing Tables in division Hash Tables of Data Structures & Algorithms I
 
This question was posed to me during an interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Right option is (a) Distinct array position for every possible key
 
For explanation: Direct addressing is possible only when we can afford to allocate an array that has one position for every possible key.