码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果
[LeetCode]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 example: Given binary tree {3,9,20,#...
分类:其他好文   时间:2015-02-13 21:12:18    阅读次数:136
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-02-11 16:23:02    阅读次数:144
Leetcode_Sum Root to Leaf Numbers
递归实现,深度遍历,记录每一条路径。 class Solution { public: int sumNumbers(TreeNode *root) { if(root==nullptr) return 0; vector> result; vector path; traverse(root,result,path); int n=result.size();...
分类:其他好文   时间:2015-02-10 13:20:24    阅读次数:141
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 andsum =...
分类:其他好文   时间:2015-02-07 14:23:22    阅读次数:169
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-02-05 23:15:41    阅读次数:191
LeetCode104——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. 难度系数: 容易 实现 int maxDepth(Tr...
分类:其他好文   时间:2015-02-05 16:28:31    阅读次数:119
LeetCode107——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 example: Given binary tree {3,9,20,#,#,15,7}...
分类:其他好文   时间:2015-02-05 16:27:50    阅读次数:107
[LeetCode] Sum Root to Leaf Numbers 求根到叶节点数字之和
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:其他好文   时间:2015-02-05 00:39:43    阅读次数:144
Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the tota...
分类:其他好文   时间:2015-02-04 21:57:07    阅读次数:180
LeetCode[Tree]: 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.  For example:  Given the below binary tree and su...
分类:其他好文   时间:2015-02-03 23:08:01    阅读次数:196
924条   上一页 1 ... 64 65 66 67 68 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!