作业帮 > 英语 > 作业

To sort an integer sequence { 3,87,12,61,70,97,26,45 } using

来源:学生作业帮 编辑:拍题作业网作业帮 分类:英语作业 时间:2024/05/22 02:06:57
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