#define True 1 #define False 0 typedef short Boolean; typedef struct node* pNode; struct node{ int data; };
pNode heap[MAX_SIZE+1]; /// index of first element is 1 int size; Boolean isFull(); Boolean isEmpty(); void insert(pNode); pNode delete(); / delete the biggest node void print(); pNode getMax();
#include "deap.h"
void print() { if(isEmpty()){ return; }
int i = 1; while(i <= size){ printf("%d ", heap[i++]->data); } printf("\n"); }