int SumOfNodes(Node root) { if(root==NULL) return 0; return root->data + SumOfNodes(root->left) + SumOfNodes(root->right); }
Enter your email address:
No comments:
Post a Comment