Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. The given programming code shown in figure 3 is written to perform the binary tree insert function. By using the following code, answer the
4. The given programming code shown in figure 3 is written to perform the binary tree "insert" function. By using the following code, answer the following question: a) Transfer the graph below into data flow annotations. [8 marks] b) Is the graph represent the correct flow of the software? If no, please redraw the correct graph and justify your answers. [8 marks] 1.4 5-7 1 void btree::insert(tnode*&ptr,int item) 2 { 3 if (ptr==NULL) 4 { 5 ptr=new tnode; 6 if(ptr==NULL) 7 { 8 coutright=NULL; ptr->left=NULL; 1 ptr-Sitem=item; 8-10 11.16 17 -06-o-rece 1 } else 18-20 1 1 { if (item
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