码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
leetcode_111题——Minimum Depth of Binary Tree(二叉树,队列)
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
leetcode_102题——Binary Tree Level Order Traversal(二叉树,广度优先搜索,队列)
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
leetcode || 94、Binary Tree Inorder Traversal
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
LeetCode --- 104. Maximum Depth of Binary Tree
题目链接: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
LeetCode --- 103. Binary Tree Zigzag Level Order Traversal
题目链接: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
LeetCode --- 105. Construct Binary Tree from Preorder and Inorder Traversal
题目链接: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
LeetCode --- 101. Symmetric Tree
题目链接: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
LeetCode --- 102. Binary Tree Level Order Traversal
题目链接: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
Populating Next Right Pointers in Each Node *
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2015-04-15 23:02:52    阅读次数:114
[LeetCode 199] Binary Tree Right Side View
题目链接: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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!