What are the definitions of the public method getNumberOfNodesand theprotected helper method getNumberOfNodesHelper?
What will be an ideal response?
```
template
int BinaryNodeTree
{
return getNumberOfNodesHelper(rootPtr);
}// end getNumberOfNodes
template
intBinaryNodeTree
getNumberOfNodesHelper(std::shared_ptr
const
{
if (subTreePtr == nullptr)
return 0;
else
return1 + getNumberOfNodesHelper(subTreePtr->getLeftChildPtr())
+ getNumberOfNodesHelper(subTreePtr->getRightChildPtr());
}// end getNumberOfNodesHelper
```
You might also like to view...
Labels that describe the different parts of a webpage.
a. Elements b. Values c. Attributes d. Headings
If you will be importing Excel data on a reoccurring basis, it is a good practice to save the import steps in Access
Indicate whether the statement is true or false
You can ____ the width or the height of the printout so that all of the columns or all of the rows fit on a single page.
A. shrink B. size C. scale D. scroll
What is another name for a folder?
A. Directory B. Program C. System D. Tree