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

(a)
The initial complete binary tree is:


(b)
The heapified tree is:


(c)
The heap after 1 is inserted is:


The heap after 10 is inserted is:


The heap after 6 is inserted is:


The heap after 4 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: