#include <stdio.h>
void swap(int a[], int b, int c) {
int tmp = a[b];
a[b] = a[c];
a[c] = tmp;
}
void heapify(int a[], int i, int n)
堆排序(小根堆)C语言实现
最新推荐文章于 2023-05-27 17:37:06 发布
#include <stdio.h>
void swap(int a[], int b, int c) {
int tmp = a[b];
a[b] = a[c];
a[c] = tmp;
}
void heapify(int a[], int i, int n)