Tuesday, April 22, 2014

Delete all the nodes in a Tree in C


void Clear(Node root)
{
   if(root == NULL)
      return;
   Clear(root->left);
   Clear(root->right);
   free(root);
}

No comments:

Post a Comment