1.

What is the time complexity of the delete function in the hash table using a binary tree?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)Question is from Hash Tables in section Hash Tables of Data Structures & Algorithms II got this question in an interview.

Answer»

The correct choice is (a) O(1)

Explanation: Time COMPLEXITY of delete function in a hash table is O(1). Condition is that the hash function should be such that the NUMBER of collisions should be LOW.



Discussion

No Comment Found

Related InterviewSolutions