【leetcode】二叉树的深度
int maxDepth(struct TreeNode* root){
if (root == NULL) {
return 0;
}
int lenLeft = maxDepth(root->left) + 1;
int lenRight = maxDepth(root->right) + 1;
return lenLeft > lenRight ? lenLeft : lenRight;
}