堆排序(刪除最大元素實現

堆排序(刪除最大元素實現) #include<iostream> using namespace std; int h[1000],n; void swap(int a,int b) { int t; t=h[a]; h[a]=h[b]; h[b]=t; return ; } void siftdown(int i) { int t,flag=0; while(i*2<=n&&fla
相關文章
相關標籤/搜索