摘要:
1 public static List<int> BinaryTreeInorderTraveral(BTNode root) 2 { 3 List<int> ret = new List<int>(); 4 BinaryTreeInorderTraveralHelper(root, ret); 5 return ret; 6 } 7 8 public static void BinaryTreeInorderTraveralHelper(BTNode ... 阅读全文
posted @ 2012-10-24 23:41
ETCOW
阅读(330)
评论(0)
推荐(0)
摘要:
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 ofeverynode never differ by more than 1. 1 public static bool BalancedBinaryTree(BTNode root) 2 { 3 i... 阅读全文
posted @ 2012-10-24 23:36
ETCOW
阅读(341)
评论(0)
推荐(0)

浙公网安备 33010602011771号