摘要:
一个简单的堆排序,不知道有没有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 阅读全文
posted @ 2012-08-30 20:24
Kevin!=NULL
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号