+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is the average retrieval time when n keys hash to the same slot?

(a) Theta(n)

(b) Theta(n^2)

(c) Theta(nlog n)

(d) Big-Oh(n^2)

My doubt is from Hash Tables in portion Hash Tables of Data Structures & Algorithms I

The question was posed to me in unit test.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
The correct option is (a) Theta(n)

Easy explanation - The average retrieval time when n keys hash to the same slot is given by Theta(n) as the collision occurs in the hash table.

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

...