Question: 1. A d-ary heap is like a binary heap, but non-leaf nodes have d children instead of two (a) (10 pts) How would you represent

 1. A d-ary heap is like a binary heap, but non-leaf

1. A d-ary heap is like a binary heap, but non-leaf nodes have d children instead of two (a) (10 pts) How would you represent a d-ary heap in an array? (b) (5 pts) What is the height of a d-ary heap of n elements in terms of n and d? (c) (10 pts) Write pseudocode for the ExTRACT-Max procedure that would work for d-ary heaps and analyze its running time in terms of d and n. Hint: You ill also have to modify the MAx-HEAPIFY sub- function (d) (10 pts) Write pseudocode for the HEAP-INCREASE-KEY pro- cedure that would work for d-ary heaps and analyze its running time in terms of d and n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!