Question: A 3 - max - heap is a like a max heap, except that all of the non - leaf children have 3 children (
A maxheap is a like a max heap, except that all of the nonleaf children have children
except possibly for the right most node on the second to last level
a Give an efficient REMOVE algorithm for maxheaps, and analyze it's running time.
b Write an efficient algorithm to convert a maxheap to a max heap, and analyze it's running
time
c If we use a maxheap to define a sorting algorithm, what is the bigO efficiency? Explain if
this is better, worse, or equivalent to regular heap sort.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
