1.

What is the search complexity in direct addressing?(a) O(n)(b) O(logn)(c) O(nlogn)(d) O(1)This interesting question is from Direct Addressing Tables in chapter Hash Tables of Data Structures & Algorithms II had been asked this question in examination.

Answer»

The CORRECT answer is (d) O(1)

For explanation: Since every key has a UNIQUE ARRAY position, SEARCHING TAKES a constant time.



Discussion

No Comment Found

Related InterviewSolutions