Tuesday, July 28, 2009

I need some help with my C++ program..Can anyone give me some advice?

I'm writing a c++ function to sort through a BST with the purpose of determining its stem of greatest height, solely through the use of recursion, and given that the only variable in the function is a nodal pointer, the only way to pass any instances of information back is to return the desired integral value since this is an "int" type recursive function


I need 2 integers to make it work; i only get to return 1. i'm trying to think of a new way to do it with just 1.





PLEASE HELP!!!

I need some help with my C++ program..Can anyone give me some advice?
just pass the current depth down. if the next node has children, keep going. otherwise return the depth. pick the larger depth for each node's child and pass it back up...


No comments:

Post a Comment