Minimum Depth of Binary TreeTotal Accepted:50435Total Submissions:173043My SubmissionsQuestionSolutionGiven a binary tree, find its minimum depth.The ...
分类:
其他好文 时间:
2015-04-16 12:10:14
阅读次数:
125
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2015-04-16 12:08:03
阅读次数:
148
problem:
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Rec...
分类:
其他好文 时间:
2015-04-16 10:27:18
阅读次数:
119
题目链接:Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
这道题...
分类:
其他好文 时间:
2015-04-16 10:25:57
阅读次数:
123
题目链接:Binary Tree Zigzag Level
Order Traversal
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 a...
分类:
其他好文 时间:
2015-04-16 10:24:56
阅读次数:
116
题目链接:Construct
Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the ...
分类:
其他好文 时间:
2015-04-16 10:24:42
阅读次数:
137
题目链接:Symmetric Tree
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
/ \
2 2
/ \ / \
3 ...
分类:
其他好文 时间:
2015-04-16 09:06:02
阅读次数:
147
题目链接:Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#...
分类:
其他好文 时间:
2015-04-16 09:03:12
阅读次数:
160
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:
其他好文 时间:
2015-04-15 23:02:52
阅读次数:
114
题目链接:binary-tree-right-side-view
import java.util.ArrayList;
import java.util.List;
/**
*
Given a binary tree, imagine yourself standing on the right side of it,
return the values of the n...
分类:
其他好文 时间:
2015-04-15 19:39:40
阅读次数:
145