摘要: int maxDepth(TreeNode* root) { if (!root) return 0; int left = maxDepth(root->left); int right = maxDepth(root->right); // 返回二叉树的深度 // 只要当前节点不为空,深度至少都 阅读全文
posted @ 2022-10-08 11:22 YaosGHC 阅读(24) 评论(0) 推荐(0)