// Interface to the BST module // !!! DO NOT MODIFY THIS FILE !!! #ifndef BST_H #define BST_H #include struct node { int value; struct node *left; struct node *right; }; /** * Creates a new empty BST */ struct node *bstNew(void); /** * Frees all memory allocated to the given BST */ void bstFree(struct node *t); /** * Inserts a value into the BST and returns the root of the updated BST */ struct node *bstInsert(struct node *t, int value); /** * Prints the BST to stdout */ void bstShow(struct node *t); /** * Prints the BST to the given file (assumed to be open for writing) */ void bstPrint(struct node *t, FILE *out); /** * Creates a BST by reading integer values from a line */ struct node *bstRead(char *line); #endif