Question: Programming Problem 2 ------USING C++ , no sorting libraries. Im learning how to do these by scratch------- 1 . Develop a program that can be
Programming Problem 2
------USING C++ , no sorting libraries. Im learning how to do these by scratch-------
1 . Develop a program that can be used to test an implementation of BinaryTreeInterface.
2 . Repeat the previous problem, but assume that the implementation represents a binary search tree
To test:
Randomly generate 100 unique values in the range of [1-200] and insert them into a binary search tree (BST1). Print height and inorder output of the BST1 tree.
Randomly generate 10 unique values in the range of [1-200] where there is an overlap with the previous values and insert them into another binary search tree (BST2). Print preorder, inorder, and postorder output of the BST2 tree.
Find and remove any values of BST2 from BST1. Print height, number of nodes, and inorder output of the modified BST1 tree.
Clear the binary search trees. Print whether trees are empty before and after clear operation.
Deliverables:
Source code for your classes A main file that tests the classes with above steps. Test output of your codes.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
