if (node) { destroy_tree(node->left); destroy_tree(node->right); delete node; } }
void BST::insert(int value) {
root_ptr = insert(root_ptr, value); }
void BST::remove(int value) {
bool found = false; root_ptr = remove(root_ptr, value, found); if (!found) { std::cout << "Value " << value << " not found in the tree." << std::endl; } else { std::cout << "Value " << value << " removed from the tree." << std::endl; } }