1.

What is the time complexity of insert function in a hash table using a binary tree?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)My question comes from Hash Tables in division Hash Tables of Data Structures & Algorithms II had been asked this question in homework.

Answer»

Right ANSWER is (a) O(1)

The EXPLANATION is: TIME complexity of insert function in a hash table is O(1) on an average. CONDITION is that the number of collisions should be low.



Discussion

No Comment Found

Related InterviewSolutions