Update code extractor of Java.

This commit is contained in:
krahets
2023-02-07 19:05:19 +08:00
parent 95bffcfb36
commit 8f512c2840
9 changed files with 99 additions and 87 deletions
+1 -9
View File
@@ -8,7 +8,7 @@
#define MAX_SIZE 5000
// 大顶堆
/* 大顶堆 */
typedef struct maxHeap {
// size 代表的是实际元素的个数
int size;
@@ -20,14 +20,6 @@ void siftDown(maxHeap *h, int i);
void siftUp(maxHeap *h, int i);
/* 构造空堆 */
maxHeap *newEmptyMaxHeap() {
// 所有元素入堆
maxHeap *h = (maxHeap *) malloc(sizeof(maxHeap));
h->size = 0;
return h;
}
/* 构造函数,根据切片建堆 */
maxHeap *newMaxHeap(int nums[], int size) {
// 所有元素入堆