码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果)
Java for LeetCode 112 Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:编程语言   时间:2015-05-23 21:22:23    阅读次数:152
Java for LeetCode 113 Path Sum II
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 and sum ...
分类:编程语言   时间:2015-05-23 21:16:11    阅读次数:196
Java for LeetCode 107 Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For ...
分类:编程语言   时间:2015-05-23 19:58:45    阅读次数:170
【leetcode】path sum--easy
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:其他好文   时间:2015-05-22 00:04:22    阅读次数:144
Leetcode#129Sum Root to Leaf Numbers
SumRoottoLeafNumbersTotalAccepted:43960TotalSubmissions:144900MySubmissionsQuestionSolutionGivenabinarytreecontainingdigitsfrom0-9only,eachroot-to-leafpathcouldrepresentanumber.Anexampleistheroot-to-leafpath1->2->3whichrepresentsthenumber123.Findtheto..
分类:其他好文   时间:2015-05-19 10:57:48    阅读次数:96
【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
【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
Sum Root to Leaf Numbers
感觉我这是傻瓜似编程,不过好歹是通过了。class Solution {public:void calcSum(TreeNode* root,int tempNum){if(root->left!=NULL){calcSum(root->left,10*tempNum+root->left->val...
分类:其他好文   时间:2015-05-17 16:31:30    阅读次数:170
【Path Sum】cpp
题目:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum...
分类:其他好文   时间:2015-05-17 02:03:11    阅读次数:116
[LeetCode] 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-05-16 20:38:48    阅读次数:152
共924条   上一页 1 ... 55 56 57 58 59 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!