+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is the search complexity in direct addressing?

(a) O(n)

(b) O(logn)

(c) O(nlogn)

(d) O(1)

Asked question is from Hash Tables in division Hash Tables of Data Structures & Algorithms I

This question was addressed to me in a national level competition.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Correct option is (d) O(1)

The explanation is: Since every key has a unique array position, searching takes a constant time.

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

...