What is the worst case efficiency for a path compression algorithm?

Category: QuestionsWhat is the worst case efficiency for a path compression algorithm?
Editor">Editor Staff asked 5 months ago

What is the worst case efficiency for a path compression algorithm?
 
(a) O(N)
 
(b) O(log N)
 
(c) O(N log N)
 
(d) O(M log N)
 
My doubt stems from Trees in section Trees of Data Structures & Algorithms I
 
This question was addressed to me in homework.

1 Answers
Editor">Editor Staff answered 5 months ago

Right option is (d) O(M log N)
 
Best explanation: The worst case efficiency for a path compression algorithm is mathematically found to be O(M 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: 40701