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) Same array position for all keys
 
I want to ask this question from Hash Tables topic in section Hash Tables of Data Structures & Algorithms I
 
The question was posed to me by my college director while I was bunking the class.

1 Answers
Editor">Editor Staff answered 4 weeks ago

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