Using Figure 6.4 as a model, illustrate the operation of HEAPSORT on the array \(A = \{5, 13, 2, 25, 7, 17, 20, 8, 4\}\).
a.)
b.)
c.)
d.)
e.)
f.)
g.)
h.)
i.)
\(A = \{2, 4, 5, 7, 8, 13, 17, 20, 25\}\).
The following LaTeX code was used to generate heap a:
The following LaTeX code was used to generate heap b:
The following LaTeX code was used to generate heap c:
The following LaTeX code was used to generate heap d:
The following LaTeX code was used to generate heap e:
The following LaTeX code was used to generate heap f:
The following LaTeX code was used to generate heap g:
The following LaTeX code was used to generate heap h:
The following LaTeX code was used to generate heap i: