摘要:
题目:[https://leetcode cn.com/problems/minimum depth of binary tree/description/] 思路:逐层遍历,当某层有子节点时,当前层即是最小深度 代码: 讨论区[https://leetcode.com/problems/minim 阅读全文
摘要:
题目:[https://leetcode cn.com/problems/maximum depth of binary tree/description/] 思路:遍历二叉树,并记录访问节点的深度,与已知最大节点比较。返回最大值 讨论区[https://leetcode.com/problems/ 阅读全文