Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Other MiddleWare
Title: dan Download
 Description: //Heap sort// initial call BuildMaxHeap will become the largest heap a [1 .. size]// the array largest element in a [1], then by a [1] and a [size] interchangeable reach correct position// new root element destroyed maximum heap nature so call MaxHeapify adjusted,// ​ ​ a [1 .. size-1] the maximum heap, a [1] a [1 .. size- The largest element 1],// ​ ​ a [1] with a [size-1] interchangeable achieve the correct position.// Repeatedly call Heapify, so that the entire number of small to large.// Note: The to exchange just destroyed a [1] is the root of the binary tree maximum heap nature, its left and right sub-binary tree or with maximum heap nature.// This is why BuildMaxHeap when you need to traverse the size/2 to 1 node in order to constitute maximum heap, only need to heap of a [1] can be.
 Downloaders recently: [More information of uploader 李子健]
 To Search:
File list (Check if you may need any files):
 

dan.cpp
    

CodeBus www.codebus.net