+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is the worst case time complexity of the insertion in the hash tree?

(a) O(logk(n))

(b) O(n^2)

(c) O(nlogk(n))

(d) O(kn)

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

I had been asked this question by my school principal while I was bunking the class.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
The correct choice is (a) O(logk(n))

For explanation: To insert a record in the hash tree the key is compressed and hashed to get the slot for the entry. So, a hash tree with branching factor k takes O(logk(n)) for insertion in worst 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

...