bst - /* * File: bst.h * -* This interface provides the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * File: bst.h * -------------------------------------------------------------- * This interface provides the function for the binary search * tree ADT. It uses the generic data type library. */ #include "gend.h" #ifndef _BSTREE_H #define _BSTREE_H #define true 1 #define false 0 typedef gend TreeItemType; typedef int bool; typedef struct _bstreeCDT *Bstree; typedef struct _bstreenode bstreenode; /* * Function: CreateBstree * Usage: T = CreateBstree(CompareKey); * This function creates a new empty binary search tree. */ Bstree CreateBstree(int (*CompareKey)(TreeItemType key1, TreeItemType key2)); /* * Function: DestroyBstree * Usage: DestroyBstree(T); * This function deletes all nodes in the tree and * and deletes the tree and frees up any memory allocated. */ void DestroyBstree(Bstree T); /* * Function: EmptyBstree * Usage: b = EmptyBstree(T); * ------------------------- * This function returns true if T is empty and * false if T contains at least one node. */ bool EmptyBstree(Bstree T);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.

Page1 / 3

bst - /* * File: bst.h * -* This interface provides the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online