From c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:08:27 +0200 Subject: add: graphs et rushs --- graphs/piscine/heap/heap.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 graphs/piscine/heap/heap.h (limited to 'graphs/piscine/heap/heap.h') diff --git a/graphs/piscine/heap/heap.h b/graphs/piscine/heap/heap.h new file mode 100644 index 0000000..085f436 --- /dev/null +++ b/graphs/piscine/heap/heap.h @@ -0,0 +1,20 @@ +#ifndef HEAP_H +#define HEAP_H + +// size_t +#include + +struct heap +{ + size_t size; + size_t capacity; + int *array; +}; + +struct heap *create_heap(void); +void add(struct heap *heap, int val); +int pop(struct heap *heap); +void delete_heap(struct heap *heap); +void print_heap(const struct heap *heap); + +#endif /* !HEAP_H */ -- cgit v1.2.3