Question: Write a binary search tree class that runs the following steps. 1. Show the binary search tree after inserting 45,43,100,34,23, and 3 into an empty
Write a binary search tree class that runs the following steps. 1. Show the binary search tree after inserting 45,43,100,34,23, and 3 into an empty BST. 2. Show the binary search tree after deleting 15 from the tree below. 3. Show the binary search tree after deleting 67 from the tree below. 4. Print the inorder, preorder, and postorder of the original binary search tree above (including 15 and 67 ). Binary search tree class should implement the following interface. Retares true if the specified element is in the tree Retares true if the eleaent is added successfully. Retares trae if the element is removed from the tree soccessfully. Prints the nodes in in order traversal. Prints the noder in preorder traversal. Prints the nodes is postorder traversal Retarns the nuaber of elea ents in the tree. Retures true if the tree is empty. Remores all clements from the tree
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
