treenode * createnode(int value)
Creates a new tree node.
Definition bst.c:6
void printtree(treenode *root)
Prints the tree in a structured format.
Definition bst.c:45
bool tree_findnumber(treenode *root, int value)
Searches for a value in the binary search tree.
Definition bst.c:63
bool tree_insertnumber(treenode **rootptr, int value)
Inserts a number into the binary search tree.
Definition bst.c:47
A node in the binary search tree.
Definition bst.h:22
struct treenode * right
Pointer to right child.
Definition bst.h:25
int value
Value stored in this node.
Definition bst.h:23
struct treenode * left
Pointer to left child.
Definition bst.h:24