What is the total time spent for N-1 merges in a dynamic equivalence problem?

Category: QuestionsWhat is the total time spent for N-1 merges in a dynamic equivalence problem?
Editor">Editor Staff asked 4 weeks ago

What is the total time spent for N-1 merges in a dynamic equivalence problem?
 
(a) O(N)
 
(b) O(log N)
 
(c) O(N log N)
 
(d) O(M log N)
 
The above asked question is from Trees in section Trees of Data Structures & Algorithms I
 
The question was asked in unit test.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct choice is (c) O(N log N)
 
Easy explanation – The total time spent for N-1 merges in a dynamic equivalence problem is mathematically found to be O(N log N).