Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:
其他好文 时间:
2014-07-03 20:34:46
阅读次数:
193
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-07-03 20:32:55
阅读次数:
429
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.class Solution...
分类:
其他好文 时间:
2014-07-03 20:25:21
阅读次数:
219
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.此题目有两种解决思路:1)递归...
分类:
其他好文 时间:
2014-07-03 20:07:01
阅读次数:
199
Two elements of a binary search tree (BST) are swapped by mistake.
分类:
其他好文 时间:
2014-07-03 19:44:18
阅读次数:
161
Given a binary tree, determine if it is a valid binary search tree (BST).
分类:
其他好文 时间:
2014-07-03 19:36:49
阅读次数:
196
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
分类:
其他好文 时间:
2014-07-03 19:20:42
阅读次数:
189
Given preorder and inorder traversal of a tree, construct the binary tree.
分类:
其他好文 时间:
2014-07-03 19:16:03
阅读次数:
149
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:
其他好文 时间:
2014-07-03 19:14:34
阅读次数:
206
Given inorder and postorder traversal of a tree, construct the binary tree.
分类:
其他好文 时间:
2014-07-03 19:13:08
阅读次数:
187