+1 vote
in Data Structures & Algorithms I by (110k points)
What is the depth of any tree if the union operation is performed by height?

(a) O(N)

(b) O(log N)

(c) O(N log N)

(d) O(M log N)

My doubt is from Trees topic in division Trees of Data Structures & Algorithms I

I had been asked this question in semester exam.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Correct choice is (b) O(log N)

For explanation: If the Unions are performed by height, the depth of any tree is calculated to be O(log 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

...