Multiplication and division to find children and parents cannot be implemented in a d-heap.

Category: QuestionsMultiplication and division to find children and parents cannot be implemented in a d-heap.
Editor">Editor Staff asked 5 months ago

Multiplication and division to find children and parents cannot be implemented in a d-heap.
 
(a) true
 
(b) false
 
The question is from Heap in section Heap of Data Structures & Algorithms I
 
The question was asked during an interview.

1 Answers
Editor">Editor Staff answered 5 months ago

The correct answer is (b) false
 
Easy explanation – Multiplication and division for finding children and parents can be implemented in a d-heap but d should be a power of 2.


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