Preps
Friday, 15 July 2011
Finding Size of the tree.
int tree_size(struct node* temp) {
if (temp==NULL)
{
return(0);
}
else
{
return(tree_size(temp->left) + tree_size(temp->right) + 1);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment