heap push

This commit is contained in:
bronku 2025-10-22 17:10:51 +02:00
parent 7916f181c5
commit 83061c4658
2 changed files with 26 additions and 11 deletions

6
heap.h
View file

@ -1,13 +1,10 @@
#pragma once
#include "record.h"
#include "stdbool.h"
typedef struct {
record* location;
int g;
int index;
int buffer_id;
bool is_blank;
} heap_record;
// almost the same as typedef buffer, but the usage is different, so I think it can be repeated
@ -15,6 +12,7 @@ typedef struct {
heap_record* location;
int length;
int capacity;
int (*compare)(const void* a, const void* b);
} heap;
heap new_heap(int size);