int
size(
struct
node* node)
{
if
(node==NULL)
return
0;
else
return
(size(node->left) + 1 + size(node->right));
}
Read full article from Write a C program to Calculate Size of a tree | GeeksforGeeks
int
size(
struct
node* node)
{
if
(node==NULL)
return
0;
else
return
(size(node->left) + 1 + size(node->right));
}
Read full article from Write a C program to Calculate Size of a tree | GeeksforGeeks
No comments:
Post a Comment