摘要: 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 the depth of the two subtrees ofevery node never differ by more than 1.分析:检查每个节点的左右子节点的高度差/** * Definition for binary tree * struct TreeNode { * int val; *... 阅读全文
posted @ 2013-04-12 12:54 冰点猎手 阅读(211) 评论(0) 推荐(0)