If there are c children of the root, how many calls to the merge procedure is required to reassemble the heap?

Category: QuestionsIf there are c children of the root, how many calls to the merge procedure is required to reassemble the heap?
Editor">Editor Staff asked 5 months ago

If there are c children of the root, how many calls to the merge procedure is required to reassemble the heap?
 
(a) c
 
(b) c+1
 
(c) c-1
 
(d) 1
 
Asked question is from Heap in division Heap of Data Structures & Algorithms I
 
This question was addressed to me in class test.

1 Answers
Editor">Editor Staff answered 5 months ago

Correct answer is (c) c-1
 
Best explanation: If there are c children of the root, then c-1 merges are required to reassemble the pairing heap.


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