Question: 3) //structure used to define each node on the tree 10 struct node ( int value struct node left struct node right; 16 13 14
3) //structure used to define each node on the tree 10 struct node ( int value struct node "left struct node "right; 16 13 14 12 15 Given the above tree, assume the variable root points to the root node (10) Write the complete syntax for deleting the following nodes (Hard code, DO NOT declare any additional variables. You have the variable root that is point to 10 and a variable temp which can hold the address of anot CODE). Do not assume that you have any predefined functions (e g. minNode) written for you of root. Root should always point to 10 her node. (HARD . D0 not change the valu Draw tree after deletion Delete 13 (Code) Don't search for 13, just get to it // variable root is pointing to 10 node temp: //this variable is also available to you //Do not declare any more variables Delete 6 (Code) (Imagine as if 13 was not deleted and you Draw tree after deletion are working with the original tree) Don't search for 6, just get to it // variable root is pointing to 10 node temp; 1/this variable is also available to you //Do not declare any more variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
