Question: Assignment description Implement the following 2 functions and put your code for 2 functions in a single file called homework 4 . cpp . (
Assignment description
Implement the following functions and put your code for functions in a single file called homeworkcppNote: you can define your own function that are called by these functions
Also include the following definition of node class in your homeworkcpp: class treenode public: int data; treenode leftright; treenodeint dtreenode NULL, treenode NULL data ; left ; right :;;
Function : int sumleavestreenode ; This function returns the sum of all leaves of a tree with root
Function : int depthnegative treenode ; this function returns the depth of a tree node with value in a tree with root This tree contains exactly one Your goal is to figure out the depth of the tree node that contains
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
