1.

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 II had been asked this question by my school principal while I was bunking the class.

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.



Discussion

No Comment Found

Related InterviewSolutions