int Count(Node root) { if(root == NULL) return 0; return 1 + Count(root->left) + Count(root->right); }
Wednesday, April 23, 2014
No.of Nodes in a Tree
Labels:
programming
Subscribe to:
Post Comments (Atom)
int Count(Node root) { if(root == NULL) return 0; return 1 + Count(root->left) + Count(root->right); }
No comments:
Post a Comment