#define LT(a,b) ((a) < (b))//大根堆 顺序
#define RT(a,b) ((a) > (b))//小根堆 逆序
template<class Type>
void HeapAdjust(Type a[],int s,int m){
//调整堆
Type rc = a[s];//顶端a[s]
for
堆排序的代码实现(大根堆\小根堆)cpp
最新推荐文章于 2023-06-18 15:15:41 发布
#define LT(a,b) ((a) < (b))//大根堆 顺序
#define RT(a,b) ((a) > (b))//小根堆 逆序
template<class Type>
void HeapAdjust(Type a[],int s,int m){
//调整堆
Type rc = a[s];//顶端a[s]
for