摘要:
一个简单的堆排序,不知道有没有BUG。~~= =代码:void Swap(DWORD& a, DWORD& b){ if(a != b) { a = a^b; b = a^b; a = a^b; }}void AdjustHeap(DWORD* dwArray, int i, int nLenth){ int nChild = i*2 + 1; while(nChild < nLenth) { //nChild指向较大的节点 if(nChild < nLenth - 1 && dwArray[nChild] < dwArray[nChild+1 阅读全文