#ifndef HEAP_H #define HEAP_H #include #define MAX_HEAP 100 typedef struct heap { int datos[MAX_HEAP]; int tamano; int tipo; } heap_t; heap_t *heap_crear(int tipo); int heap_insertar(heap_t *heap, int elemento); int heap_extraer_min(heap_t *heap); int heap_extraer_max(heap_t *heap); int heap_minimo(heap_t *heap); int heap_maximo(heap_t *heap); bool heap_vacio(heap_t *heap); int heap_tamano(heap_t *heap); void heapify_up(heap_t *heap, int indice); void heapify_down(heap_t *heap, int indice); void heap_intercambiar(heap_t *heap, int i, int j); int heap_construir(heap_t *heap, int *array, int n); void heapsort(int *array, int n); void heap_destruir(heap_t *heap); void heap_imprimir(heap_t *heap); #endif