码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
106 Construct Binary Tree from Inorder and Postorder Traversal
public class Solution { public TreeNode buildTree(int[] inorder, int[] postorder) { if (inorder == null || postorder == null || inorder.leng...
分类:其他好文   时间:2015-05-19 10:11:11    阅读次数:113
105 Construct Binary Tree From Preorder and Inorder Traversal
public class Solution { public TreeNode buildTree(int[] preorder, int[] inorder) { if (preorder == null || inorder == null || preorder.lengt...
分类:其他好文   时间:2015-05-19 10:09:22    阅读次数:136
hdu 1622 Trees on the level
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1622小白书上的题。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using std::queue; 8 u...
分类:其他好文   时间:2015-05-18 22:23:05    阅读次数:104
LeetCode: Binary Tree Maximum Path Sum
Title:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, ...
分类:其他好文   时间:2015-05-18 16:35:54    阅读次数:108
Binary Tree Postorder Traversal
https://leetcode.com/problems/binary-tree-postorder-traversal/Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given...
分类:其他好文   时间:2015-05-18 12:49:08    阅读次数:98
【Sum Root to Leaf Numbers】cpp
题目:Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which ...
分类:其他好文   时间:2015-05-18 12:45:37    阅读次数:100
【Binary Tree Maximum Path Sum】cpp
题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2015-05-18 12:41:10    阅读次数:113
Binary Tree Maximum Path Sum -- leetcode
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / 2 3 Return 6. ...
分类:其他好文   时间:2015-05-18 09:18:17    阅读次数:102
leetcode--Gray Code
题目描述 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the se...
分类:其他好文   时间:2015-05-18 09:12:13    阅读次数:118
【Path Sum II】cpp
题目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsu...
分类:其他好文   时间:2015-05-17 23:29:44    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!