To sort an integer sequence { 3,87,12,61,70,97,26,45 } using Heapsort.Please fill in the blanks.(8 points)

问题描述:

To sort an integer sequence { 3,87,12,61,70,97,26,45 } using Heapsort.Please fill in the blanks.(8 points)
The initial heap structure after building the heap:
The sorting progress:
(1)87 70 26 61 45 12 3 97;(2) ;
(3)61 45 26 3 12 70 87 97;(4) ;
(5)26 12 3 45 61 70 87 97;(6) ;
(7)3 12 26 45 61 70 87 97.

(2) 70, 61, 26, 3, 45, 12, 87, 97
(4) 45, 12, 26, 3, 61, 70, 87, 97
(6) 12, 3, 26, 45, 61, 70, 87, 97