php网站换服务器百度企业官网认证
题目:
代码(首刷自解 day23):
class Solution {
public:int maxDepth(TreeNode* root) {if(root==nullptr) return 0;return max(maxDepth(root->left),maxDepth(root->right))+1;}
};
class Solution {
public:int maxDepth(TreeNode* root) {if(root==nullptr) return 0;return max(maxDepth(root->left),maxDepth(root->right))+1;}
};