recursion and binary trees

This is a discussion on recursion and binary trees within the C++ Programming forums, part of the General Programming Boards category; Hey guys, i was wondering if anyone could explain this to me
Code:
int maxdepth (treeptr tree){
int leftdepth = ...

The base case is tree == NULL.
So the function will start by traversing down the left most branch until it reaches the base case. From there, it will sort of work backwards to find the maxdepth of the leftside. It will then repeat for the right side, compare which is larger and return that side.

The base case is tree == NULL.
So the function will start by traversing down the left most branch until it reaches the base case. From there, it will sort of work backwards to find the maxdepth of the leftside. It will then repeat for the right side, compare which is larger and return that side.