摘要: 104.二叉树的最大深度 1、后续遍历递归法 class Solution: def maxDepth(self, root: Optional[TreeNode]) -> int: if root is None: return 0 left_depth = self.maxDepth(root. 阅读全文
posted @ 2023-10-28 11:02 忆象峰飞 阅读(10) 评论(0) 推荐(0)