int numOfNode=0;
void maxNode(tree *rootNode)
{
if(rootNode == NULL)
return;
maxNode(rootNode->right);
numOfNode++;
if(numOfNode == 5)
printf("%d\n",rootNode->data);
maxNode(rootNode->left);
}
No comments:
Post a Comment