1.

What is the time complexity of search function in a hash table using list head?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)I'm obligated to ask this question of Hash Tables in division Hash Tables of Data Structures & Algorithms IThe question was posed to me during a job interview.

Answer»

Correct ANSWER is (a) O(1)

The BEST explanation: Time complexity of search function in a hash table is O(1). Condition is that the NUMBER of COLLISIONS should be low.



Discussion

No Comment Found

Related InterviewSolutions