What is the fundamental operation on leftist heap?

Category: QuestionsWhat is the fundamental operation on leftist heap?
Editor">Editor Staff asked 5 months ago

What is the fundamental operation on leftist heap?
 
(a) insertion
 
(b) merging
 
(c) deletion
 
(d) swapping
 
My question is taken from Heap topic in section Heap of Data Structures & Algorithms I
 
This question was addressed to me in a job interview.

1 Answers
Editor">Editor Staff answered 5 months ago

The correct option is (b) merging
 
The explanation is: The fundamental operations on leftist heaps is merge. Insertion operation is a merge of a one-node heap with a larger 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