What happens if the null path length is not updated?

Category: QuestionsWhat happens if the null path length is not updated?
Editor">Editor Staff asked 5 months ago

What happens if the null path length is not updated?
 
(a) error occurs
 
(b) all null path lengths will be 0
 
(c) all null path lengths will be -1
 
(d) all null path lengths will be 1
 
My query is from Heap topic in division Heap of Data Structures & Algorithms I
 
I had been asked this question in an online interview.

1 Answers
Editor">Editor Staff answered 5 months ago

Right choice is (b) all null path lengths will be 0
 
Explanation: While performing insertion via merge operation in a leftist heap, if the null path length is not updated, all null path lengths will be 0.


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