Question: A d-ary heap is like a binary heap, but (with one possible exception) non-leaf nodes have d children instead of 2 children. (Note: dont not
A d-ary heap is like a binary heap, but (with one possible exception) non-leaf nodes have d children instead of 2 children. (Note: dont not assume d is constant.)
How would you represent a d-ary heap in an array? (write down explicitly how to find the index of a nodes parent, and i-th child).
What is the height of a d-ary heap of n elements in terms of n and d?
Give an efficient algorithm (pseudocode needed) of deleting the maximum value in d-ary max-heap.
State the running time in terms of d and n.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
