Focus on the main (driver program) or int main (), just make a menu driven program on how the following program works.
DevC++ Code (paste the link to browser):
https://paste.ofcode.org/K3uqRBy7z65V4exvcrShgF
Focus on the main (driver program) or int main (), just make a menu driven program on how the following program works.
Laboratory Task 8:
Create a menu-driven program that will properly insert a new element to the Binary Search Tree (BST). The options of the program are the following:
1. Insert Element
2. Display Binary Search Tree
3. Exit
Option (1) inserts a new element to its proper location in the BST. Take note of the following properties of the Binary Search Tree:
The left subtree of a node contains only nodes with elements lesser than the element. The right subtree of a node contains only nodes with elements greater than the node s element.
The left and right subtree each must also be a BST. There must be no
duplicate nodes.
Option (2) displays all the elements in the BST in proper order.
Option (3) exits the program.
Step by step
Solved in 4 steps with 2 images