码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果
Path Sum II
Path Sum IIGiven 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 tr...
分类:其他好文   时间:2014-12-11 20:36:17    阅读次数:205
Sum Root to Leaf Numbers
Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-l...
分类:其他好文   时间:2014-12-10 22:42:43    阅读次数:166
[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 represents the number 123. Find the tota...
分类:其他好文   时间:2014-12-09 17:47:47    阅读次数:196
leetcode[129] Sum Root to Leaf Numbers
给定一个数,从根节点到叶节点是一个值,返回所有的值的和。例如:For example, 1 / \ 2 3The root-to-leaf path1->2represents the number12.The root-to-leaf path1->3represents the ...
分类:其他好文   时间:2014-12-06 21:27:26    阅读次数:222
LeetCode[Tree]: 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 total sum ...
分类:其他好文   时间:2014-12-04 21:39:20    阅读次数:209
Java数据结构系列之——树(1):二叉树基本概念及特点小结
度的概念:结点拥有的子树数称为结点的度(degree)。度为0的结点称为叶结点(leaf)或者终端结点。度不为0的结点称为非终端结点或者分支结点。除根节点以外,分支结点也称为内部结点。树的度是树内部结点的度的最大值。 树的深度或者高度:结点的层次从根开始定义起,根为第一层,根的孩子为第二层。树中结点的最大层次称为树的深度或者高度。 树的表示法:(1)双亲表示法(2)孩子表示法(3)孩子兄弟表示...
分类:编程语言   时间:2014-12-04 20:08:27    阅读次数:307
Android与设计模式——组合(Composite)模式
定义(GoF《设计模式》):将对象组合成树形结构以表示“部分整体”的层次结构。组合模式使得用户对单个对象和使用具有一致性。   涉及角色   1.Component:(View)是组合中的对象声明接口,在适当的情况下,实现所有类共有接口的默认行为。声明一个接口用于访问和管理Component子部件。   2.Leaf:(TextView、自定义View)在组合中表示叶子结点对象,叶子...
分类:移动开发   时间:2014-12-04 19:58:28    阅读次数:157
取出当前脚本所在位置、文件名
1 #分别取出当前脚本的父目录、文件名 2 $Currentpath1 = Split-Path -parent $MyInvocation.MyCommand.Definition 3 $Currentpath2 = Split-Path -leaf $MyInvocation.M...
分类:其他好文   时间:2014-12-04 11:37:16    阅读次数:96
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 =...
分类:其他好文   时间:2014-12-03 21:13:33    阅读次数:182
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...
分类:其他好文   时间:2014-12-03 21:12:00    阅读次数:153
924条   上一页 1 ... 71 72 73 74 75 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!