递归

  • 终止条件
if (pRoot == NULL) return 0;
  • 最长路径
return max(TreeDepth(pRoot->left), TreeDepth(pRoot->right)) + 1;