Data Structures, Algorithms, & Applications in C++
Chapter 12, Exercise 7

(a)
The initial complete binary tree is:


(b)
The heapified tree is:


(c)
The heap after 15 is inserted is:


The heap after 20 is inserted is:


The heap after 45 is inserted is:


(d)
The heap after the first remove max operation is:


The heap after the second remove max operation is:


The heap after the third remove max operation is: