摘要: 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 of every node never differ by more than 1. 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * ... 阅读全文
posted @ 2014-03-15 01:51 beehard 阅读(109) 评论(0) 推荐(0) 编辑