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 1 month 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 1 month 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.