摘要:
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... 阅读全文
posted @ 2015-07-28 16:11
amazingzoe
阅读(104)
评论(0)
推荐(0)
摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2015-07-28 13:29
amazingzoe
阅读(159)
评论(0)
推荐(0)
摘要:
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an... 阅读全文
posted @ 2015-07-28 13:07
amazingzoe
阅读(126)
评论(0)
推荐(0)
摘要:
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ... 阅读全文
posted @ 2015-07-28 12:54
amazingzoe
阅读(153)
评论(0)
推荐(0)
摘要:
Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al... 阅读全文
posted @ 2015-07-28 10:41
amazingzoe
阅读(183)
评论(0)
推荐(0)
浙公网安备 33010602011771号