題組內容

三、若ㄧ最大堆積(max heap)內部儲存下列數列: 9, 6, 8, 4, 2, 5, 7, 3, 1 請問:

⑵請利用⑴所得之最大堆積,以堆積排序法(heap sort)將其由小到大排序,並列出 每回合最大堆積的結果。(10 分)