Write a program named ProblemA.cpp that implements the following functions using recursion. Make a menu-based implementation so that you can call each function based on the user input. • insert: insert a new node in the BST Node* insert (Node* root, int key); • print: prints the values of all items in the tree, using inorder traversal technique void inorder (Node* root); • search: search a node with a value in the BST Node* insert (Node* root, int key);
Write a program named ProblemA.cpp that implements the following
functions using recursion. Make a menu-based implementation so that you can call each function based
on the user input.
• insert: insert a new node in the BST
Node* insert (Node* root, int key);
• print: prints the values of all items in the tree, using inorder traversal technique
void inorder (Node* root);
• search: search a node with a value in the BST
Node* insert (Node* root, int key);
• findMinimum: returns the element with the minimum value in the BST
Node* findMinimum (Node* root);
• findMaximum: returns the element with the maximum value in the BST
Node* findMaximum (Node* root);
• delete: delete a node from the BST
Node* delete (Node* root, int key);
Step by step
Solved in 3 steps with 1 images