码迷,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,#,#,15,7}, ...
分类:其他好文   时间:2015-05-05 10:40:01    阅读次数:113
Path Sum
https://leetcode.com/problems/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...
分类:其他好文   时间:2015-05-05 01:15:10    阅读次数:184
[LeetCode] Binary Tree Level Order Traversal II
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 examp...
分类:其他好文   时间:2015-05-04 20:14:35    阅读次数:182
[LeetCode] Path Sum
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 bina...
分类:其他好文   时间:2015-05-04 15:30:49    阅读次数:113
LeetCode 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. 题意:求树的高度。 思路:就是递归。 /** * Definiti...
分类:其他好文   时间:2015-05-01 12:06:48    阅读次数:163
【leetcode】Sum Root to Leaf Numbers(hard)
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-04-30 19:47:36    阅读次数:107
浅谈设计模式之七——Composite模式
同样地,先上uml图: 组合模式的意图:将对象组合合成树形结构以表示“部分-整体”的层次结构。Composite使得用户对单个对象和组合对象的使用具有一致性。 uml解析:leaf是叶节点,Composite可以理解为是一个多个叶节点的组合,它是非叶节点,就相当于一个元件以及一个元件容器,里面有很多元件一样。这里可以用list或者vector实现。 本来是想用模板来实现,后来发现实在是多此...
分类:其他好文   时间:2015-04-28 23:03:34    阅读次数:215
leetcode || 129、Sum Root to Leaf Numbers
problem: 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...
分类:其他好文   时间:2015-04-28 11:48:32    阅读次数:160
leetcode:Binary Tree Level Order Traversal II
Given 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 exa...
分类:其他好文   时间:2015-04-27 00:04:32    阅读次数:179
leetcode_113题——Path Sum II(深度优先搜索)
Path Sum IITotal Accepted:41402Total Submissions:155034My SubmissionsQuestionSolutionGiven a binary tree and a sum, find all root-to-leaf paths where ...
分类:其他好文   时间:2015-04-24 22:27:17    阅读次数:159
924条   上一页 1 ... 57 58 59 60 61 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!