The best algorithms of INSERT and DELETE operations on heap is presented,by which HEAPSORT is improved. Inserting one element into and deleting one element from a heap of n elements spend at most [loglogn] comparisons...The best algorithms of INSERT and DELETE operations on heap is presented,by which HEAPSORT is improved. Inserting one element into and deleting one element from a heap of n elements spend at most [loglogn] comparisons and [logn]comparisons and transfers of element in the worst cases respectively. The improved HEAPSoRT spends n log n + n log logn + O(n) comparisons and element transfers (notswapl) in the worst case. It may be the best HEAPSORT algorithm since the lower bound of sorting algorithm [log nl] n log n + o(n). Especially, in element trallsfer,this is the best result we known so far.展开更多
文摘The best algorithms of INSERT and DELETE operations on heap is presented,by which HEAPSORT is improved. Inserting one element into and deleting one element from a heap of n elements spend at most [loglogn] comparisons and [logn]comparisons and transfers of element in the worst cases respectively. The improved HEAPSoRT spends n log n + n log logn + O(n) comparisons and element transfers (notswapl) in the worst case. It may be the best HEAPSORT algorithm since the lower bound of sorting algorithm [log nl] n log n + o(n). Especially, in element trallsfer,this is the best result we known so far.