/*
* leftheap.h
*/
#ifndef _LEFT_HEAP_H
#define _LEFT_HEAP_H
#ifndef NULL
#define NULL (0)
#endif
typedef int ElementType;
struct TreeNode;
typedef struct TreeNode *PriorityQueue;
/*
* Minimal set of priority queue operations.
* Note that nodes will be shared among several leftist heaps after a merge;
* the user must make sure to not use the old leftist heaps.
*/
#ifdef __cplusplus
extern "C" {
#endif
PriorityQueue Initialize();
ElementType FindMin(PriorityQueue H);
int IsEmpty(PriorityQueue H);
PriorityQueue Merge(PriorityQueue H1, PriorityQueue H2);
#define Insert(X, H) ( H = Insert1((X), H))
PriorityQueue Insert1(ElementType X, PriorityQueue H);
PriorityQueue DeleteMin1(PriorityQueue H);
#ifdef __cplusplus
}
#endif
#endif /* _LEFT_HEAP_H */