Understanding of a C Code Required..

Posted by RBA on Stack Overflow See other posts from Stack Overflow or by RBA
Published on 2010-05-09T09:34:57Z Indexed on 2010/05/09 9:38 UTC
Read the original article Hit count: 163

Filed under:
|
int Size(struct node* node)
{
   if(node == NULL)
   {
      return 0;
   }
   else if(node != NULL)
   {
      return (Size(node->left) + 1 + Size(node->right));
   }
}

Hi, Can Anybody please post the stack trace for the following piece of code.

Lets say if we insert the values 2, 1, 10, 5... Then what could be the stack representation during the recursion process.. Please, its very urgent, and its very confusing too...

© Stack Overflow or respective owner

Related posts about c

    Related posts about recursion