#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define swap(a,b) {\
__typeof(a) temp = a;\
a = b; b = temp;\
}
void update(int num[],int begin,int end){
int cur = begin,max = begin;
if(cur * 2 <= end && num[max] < num[cur*2]) max = cur * 2;
if(cur * 2+1 <= end && num[max]
线性建堆法与堆排序
最新推荐文章于 2024-04-22 17:16:38 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)