+1 vote
in Data Structures & Algorithms I by (110k points)
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 I

The question was asked during an interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best 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).

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...