码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果
LeetCode[Tree]: 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 = 22, return 这个题目适合用递归来解,我...
分类:其他好文   时间:2015-02-03 23:05:29    阅读次数:184
Leetcode#129 Sum Root to Leaf Numbers
原题地址二叉树的遍历代码: 1 vector path; 2 3 int sumNumbers(TreeNode *root) { 4 if (!root) 5 return 0; 6 7 int sum =...
分类:其他好文   时间:2015-02-01 23:04:15    阅读次数:165
leetcode 129. Sum Root to Leaf Numbers
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 rep...
分类:其他好文   时间:2015-01-31 12:05:25    阅读次数:209
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 = 22, 5 / ...
分类:其他好文   时间:2015-01-30 22:56:04    阅读次数:128
LeetCode 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 = 22, 5 / \...
分类:其他好文   时间:2015-01-28 16:06:39    阅读次数:109
30: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...
分类:其他好文   时间:2015-01-27 23:09:49    阅读次数:206
[LeetCode] Binary Tree Upside Down的三种解法
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it upside down and turn it into a tree where the origin...
分类:其他好文   时间:2015-01-27 07:07:43    阅读次数:193
Path Sum
1. 问题描述 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 = 22, 5 /...
分类:其他好文   时间:2015-01-25 21:06:41    阅读次数:128
Leetcode: Binary Tree Upside Down
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up...
分类:其他好文   时间:2015-01-19 09:07:58    阅读次数:134
[LeetCode] Binary Tree Level Order Traversal II
iven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exam...
分类:其他好文   时间:2015-01-16 22:17:55    阅读次数:292
924条   上一页 1 ... 65 66 67 68 69 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!