1.

What is the space complexity of a treap algorithm?(a) O(N)(b) O(log N)(c) O(log N)(d) O(N^2)The above asked question is from Binary Trees in section Binary Trees of Data Structures & Algorithms IThe question was asked during an interview.

Answer»

The correct answer is (a) O(N)

The EXPLANATION is: The AVERAGE CASE and worst case space COMPLEXITY of a treap is MATHEMATICALLY found to be O(N).



Discussion

No Comment Found

Related InterviewSolutions