Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In java please. Data Structures Write a program which will process beveral sets of numbers. 1)Creato a binembers, you mue. 2) Print the using 3)
In java please.
Data Structures Write a program which will process beveral sets of numbers. 1)Creato a binembers, you mue. 2) Print the using 3) Call a subroutine "oount, which retuns the number of nodes in the tree 4) Call asubrouthe ldren" which prints the nmber of children eBch node has 5) Insert and delete several nodes according to the Instructione glven 8) Print the tree again using inorder, "preorder, and "postorder 7) Call subroutine "oount" again, which returns the number of nodes in the tree 8) Call a subroutine "children" again, which prints the number of children each node has 9) Free the tree For each set of numbers, you must tree using "inorder, preorder, and "poetorder To be done using dynamic storage and pointers. To be done using static storage and arrays. Data to be used: (-999 terminates the original data) 1234567891011 12 13 14 15 16 17 18 19 20.999 Insert 21 Delete 1 Insert 0 Delete 10 Delete 11 Delete 5 Delete 2 Insert 10 Set#1 315-999 Delete 3 Set#2 Delete 1 Set #3-999 Delete 15 Delete 20 Insert 30 Delete 10 Insert 5 Insert 10 Delete 5 Delete 15 Insert 20 Delete 30 Set #4 2-999 Delete 2 Set#5 1125 75 12 37 60 90 8 15 32 45 50 67 97 95-999 Delete 37 Delete 15 Insert 40 Insert 99 Set#8 50 40 60 30 70 20 80 10 90-999 Set#7 304020 1050-999 Note: Your inservdelete routines must be able to handle duplicate values and deleting non-existant values
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started