int maxDepth(TreeNode* root) { if (!root == NULL) return 0; return max(maxDepth(root->left), maxDepth(root->right)) + 1; }
posted on 2018-01-24 00:34 willaty 阅读(75) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 willaty Powered by .NET 9.0 on Kubernetes