1.

What is the worst case time complexity of query operation(n is the no. of candidates)?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)Query is from Trees in chapter Trees of Data Structures & Algorithms IThe question was asked by my college professor while I was bunking the class.

Answer»

Correct answer is (B) O(n)

Best explanation: The worst case in a BIN query occurs when all the candidates are concentrated in ONE bin. So in this case the time COMPLEXITY is O(n).



Discussion

No Comment Found

Related InterviewSolutions