Question: Answer the following questions about max-heaps. (a) How many elements of a max-heap of height h can have? Explain your answer. (b) Where in
Answer the following questions about max-heaps. (a) How many elements of a max-heap of height h can have? Explain your answer. (b) Where in a max-heap might the smallest element reside, assuming that all elements are distinct? Explain your answer. (c) Draw the max-heaps (initially empty) after each insertion of elements 9, 11, 12, 3, 14, 15, 7, 8, 1 in that order. (d) Draw the max-heaps after each of two delete operations.
Step by Step Solution
3.51 Rating (151 Votes )
There are 3 Steps involved in it
a In a maxheap of height h the number of elements can vary However we can calculat... View full answer
Get step-by-step solutions from verified subject matter experts
