Question: You are to use Binary Trees to do this Program. Write a complete program, which will process several sets of numbers: For each set of

You are to use Binary Trees to do this Program. Write a complete program, which will process several sets of numbers: For each set of numbers you should: 1. Create a binary tree.2. Print the tree using inorder, preorder, and postorder.3. Call a method Count which counts the number of nodes in the tree.4. Call a method Children which prints the number of children each node has.5. Inset and delete several nodes according to the instructions given. 6. Print the tree again using inorder, preorder, and postorder.7. Call a method Count again which counts the number of nodes in the tree.8. Call a method again Children which prints the number of children each node has. Data to be used Use a value to determine end of data (example -999)1. Set #1: 1234567891011121314151617181920-999Insert 21, Delete 16, Insert 30, Delete 10, Delete 12, Delete 22. Set #2: 315-999Insert 3, Insert 14, Insert 33, Insert 2, Insert 63. Set #3: 11257512376090815324550679795-999Insert 21, Delete 60, Insert 30, Delete 45, Delete 97, Delete 254. Set #4: 1504060393427108215-999Insert 21, Delete 139, Insert 34, Delete 27, Insert 12, Delete 825. Set #5: 2-999Delete 26. Set #6: 34653748151692564374-999Insert 21, Delete 34, Insert 30, Insert 10, Insert12, Insert 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!