action:
int f(tnode
{
int sLeft, sRight;
if (t != NULL)
{
sLeft = f(t->left);
sRight = f(t->right);
return t->nodeValue + sLeft + sRight;
}
else
return 0;
}
Please provide a complete program if it makes sense.
Binary Trees. See attached file for full problem description.
Data Structures with C++ using STL are demonstrated.