# 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 5 months 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.

Editor">Editor Staff answered 5 months 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).

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702