What is the efficiency of merge used in leftist heaps?

Category: QuestionsWhat is the efficiency of merge used in leftist heaps?
Editor">Editor Staff asked 5 months ago

What is the efficiency of merge used in leftist heaps?
 
(a) O(N)
 
(b) O(N log N)
 
(c) O(M log N)
 
(d) O(log N)
 
Origin of the question is Heap topic in division Heap of Data Structures & Algorithms I
 
The question was posed to me in an interview for job.

1 Answers
Editor">Editor Staff answered 5 months ago

Correct answer is (d) O(log N)
 
The best explanation: The efficiency of merge operations in leftist heap is mathematically found to be O( log N) which is the same in binary heaps.


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