Question: 1. Write the definition of the function, nodeCount, that returns the number of nodes in a binary tree. Add this function to the classbinaryTreeType and

1. Write the definition of the function, nodeCount, that returns the number of nodes in a binary tree. Add this function to the classbinaryTreeType and create a program to test this function. 2. Write the definition of the function, leavesCount, that takes as a parameter a pointer to the root node of a binary tree and returns the number of leaves in a binary tree. Add this function to the class binaryTreeType and create a program to test this function. 3. Write a function, singleParent, that returns the number of nodes in a binary tree that have only one child. Add this function tothe class binaryTreeType and create a program to test this function.

Please I need the solution with the sample output. Its in C++

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!