摘要: [抄题]: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which t 阅读全文
posted @ 2018-01-28 22:30 苗妙苗 阅读(141) 评论(0) 推荐(0) 编辑
摘要: [抄题]: 给定一个二叉树,找出其最大深度。 二叉树的深度为根节点到最远叶子节点的距离。 [思维问题]: [一句话思路]: 分合法的定义 [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): [画图]: [一刷]: 求最小距离时,注意左边或右边没有数的情况 阅读全文
posted @ 2018-01-28 18:35 苗妙苗 阅读(289) 评论(0) 推荐(0) 编辑