.设n为结点个数datatype为结点信息类型为了进行堆排序定义
TYPE node=RECORD keyinteger;infodatatype END;
VAR heapARRAY[n] OF node
lrijn ;xnode;
在下面的算法描述中填入正确的内容使其实现年Floyd提出的建堆筛选法要求堆建成后便找到了最小的关键码
筛选算法sift(lrheap)
步.[准备] i←l; j ←()___; x←heap[i]
步.[过筛] 循环当()____时反复执行
⑴.若j<r且 heap[j]key>heap[j+]key 则()____
⑵.若()___则heap[i]←heap[j]; ()____; ()____ 否则跳出循环
步[结束]
heap[i] ← ()____ 【山东工业大学 三 (分)】
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []