动漫网站开发 sh框架,建设四川网站,怎样建立企业网站,免费企业营销网站制作剑指 Offer 55 - I. 二叉树的深度
解题思路#xff1a;
class Solution {
public:int maxDepth(TreeNode* root) {if(rootNULL)return 0;int lmaxDepth(root-left);int rmaxDepth(root-right);return (lr?l:r)1;}
};剑指 Offer 55 - I. 二叉树的深度
解题思路
class Solution {
public:int maxDepth(TreeNode* root) {if(rootNULL)return 0;int lmaxDepth(root-left);int rmaxDepth(root-right);return (lr?l:r)1;}
};