Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need answers to 7. Given a binary search as shown on the right, Where, the num

ID: 3769692 • Letter: I

Question

I need answers to 7. Given a binary search as shown on the right, Where, the numbers on the node are values in the key members of the items in the tree. Show the order in which the nodes in the nee are processed by a pre-order traversal of the tree? Show the order in which the nodes in the tree are processed by a post-order traversal of the tree? Please write a few statements to create a new tree node (TreeNode) containing 70 and insert the new node into the binary search tree. Please write a few statements to delete the tree node containing 22. Show the contents of the array

Explanation / Answer

Answer :

1) The order is : 22 , 29 , 48 , 50 , 56 ,60 , and 64

2) The order is : 29 , 52 ,50 , 60 , 64 and 56

3) void insert (node**TreeNode, int 70 )

{

node *temp = NULL;

if(!(*TreeNode)

{

temp = (node*)malloc(sizeof(node));

temp--> left = temp---> right = NULL;

temp--> data = 70;

TreeNode = temp;

return;

}

4)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote