摘要: 1、110 平衡二叉树 递归法 求深度适合用前序遍历,而求高度适合用后序遍历。 class Solution { boolean flag = false; public boolean isBalanced(TreeNode root) { int height = getHeight(root) 阅读全文
posted @ 2023-03-30 16:32 黄三七 阅读(43) 评论(0) 推荐(0)