74 bool search(
int value)
const;
Declaration of the Node class.
void levelOrder() const
Performs a level-order (breadth-first) traversal of the tree.
void inorder() const
Performs an inorder traversal of the tree.
void insert(int value)
Inserts a value into the BST.
BST()
Constructs an empty BST.
bool remove(int value)
Removes a value from the BST if it exists.
bool search(int value) const
Searches for a value in the BST.
~BST()
Destroys the BST and frees all dynamically allocated nodes.
Represents a node within a binary search tree.