Archive for the ‘HEAP’ Category

HEAP_TREE

March 27, 2008

HOME /* PROGRAM TO IMPLEMENT HEAPTREE #include “iostream.h” #define SIZE 100 class heap { private: int a[SIZE]; void siftup(int i); void siftdown(int i); public: heap(); void build_heap(); void insert(int num); int deletemin(); void put_data(); int empty(); }; heap::heap() { int i; a[0] =0; // no. of elements in the heap for(i=1; i<SIZE; i++) a[i] = [...]

Follow

Get every new post delivered to your Inbox.