int MaxDepth(Node n)
{
if (!n.left && !n.right)
return 1;
int l = 0;
if (n.left)
l = MaxDepth(n.left) + 1;
int r = 0;
if (n.right)
r = MaxDepth(n.right) + 1;
return Max(l, r);
}
link: http://www.cnblogs.com/mend/archive/2012/04/09/2439486.html