if(curr == NULL)
  return 0;
if(curr->left == NULL && curr->right == NULL)
  return 0;
return 1 + max(func(curr->left), func(curr->right))

On 4/3/06, shooshweet <[EMAIL PROTECTED]> wrote:

Hi,

Can anybody please suggest where I can find an algorithm that
recursively calculates the length of the internal path in a binary
tree?


Thanks.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to