Question: Write a C++ code for the following scenarios. The code should be complete in terms of its functionality and prototypes of the functions can't be

Write a C++ code for the following scenarios. The code should be complete in terms of its functionality and prototypes of the functions can't be changed.

Suppose you are provided with a root node of Binary Tree of integers containing N levels, which is already implemented. Your task is to implement the following function.

last3_MinMaxSum (Node *) the function returns the smallest, largest and the sum of all the nodes present in last 3 levels of the Binary Tree.

E.g. for the following Binary Tree, when the function is called by passing the address of the root, it will return 2, 15 and 119 (sum of all the nodes in last 3 levels)

Construct the AVL tree for the following by providing tree status after each insertion

100, 200, -50, 19, 10, 50, -90

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 Databases Questions!