码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果
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 ...
分类:其他好文   时间:2016-09-12 00:41:41    阅读次数:120
100. Same Tree
思路:递归。 null也是tree。 null tree (definition) Definition: (1) A tree which is empty. (2) A tree whose leaf nodes all have a null value. https://xlinux.nis ...
分类:其他好文   时间:2016-09-10 06:44:29    阅读次数:165
129. 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 ...
分类:其他好文   时间:2016-09-09 16:53:45    阅读次数:106
Leetcode 257. Binary Tree Paths
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: ...
分类:其他好文   时间:2016-08-28 18:07:27    阅读次数:135
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. F ...
分类:其他好文   时间:2016-08-28 16:09:59    阅读次数:105
组合模式
组合模式 组合模式主要描述部分与整体的关系,当我们描述的结构是树形结构时如XML,可以使用组合模式来处理,它最大的好处就是使得用户处理树中根节点、分支节点以及叶子节点具有一致性。 其类图结构如下所示: 抽象构建(Component):定义叶子和容器构建的共同点 叶子(leaf):叶子对象,其下再也没 ...
分类:其他好文   时间:2016-08-24 18:58:34    阅读次数:162
leetcode No104. Maximum Depth of Binary Tree
Question: 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. 找二叉树的最大深度 Algori...
分类:其他好文   时间:2016-08-22 10:53:34    阅读次数:132
leetcode No107. Binary Tree Level Order Traversal II
Question: 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,2...
分类:其他好文   时间:2016-08-22 10:51:24    阅读次数:162
茎叶图(stem)
介绍 茎叶图(Stem-and-Leaf display)又称“枝叶图”,由统计学家约翰托奇( Arthur Bowley)设计,它的思路是将数组中的数按位数进行比较,将数的大小基本不变或变化不大的位作为一个主干(茎),将变化大的位的数作为分枝(叶),列在主干的后面,这样就可以清楚地看到每个主干后面... ...
分类:其他好文   时间:2016-08-14 14:37:32    阅读次数:181
sum-root-to-leaf-numbers-LeetCode
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 ro ...
分类:其他好文   时间:2016-08-14 07:16:36    阅读次数:155
924条   上一页 1 ... 30 31 32 33 34 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!