码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果
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...
分类:其他好文   时间:2015-01-15 09:26:49    阅读次数:117
[C++]LeetCode: 94 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...
分类:编程语言   时间:2015-01-14 22:59:16    阅读次数:431
LeetCode--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 sum ...
分类:其他好文   时间:2015-01-14 16:58:45    阅读次数:167
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-14 16:55:08    阅读次数:202
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-01-14 15:36:13    阅读次数:127
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. /** * Definition for binary tree *...
分类:其他好文   时间:2015-01-14 12:49:54    阅读次数:131
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-14 00:43:38    阅读次数:166
LeetCode112——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 sum...
分类:其他好文   时间:2015-01-13 19:55:05    阅读次数:174
【数据结构第三周】树知识点整理(上)
1、树的定义树(Tree):n(n>=0)个结点构成的有限集合子树是不相交的。除了根节点外,每个结点有且仅有一个父结点。一棵N个结点的树有N-1条边。2、树的一些基本术语(1)结点的度(Degree):结点的子树个数(2)树的度:树的所有结点中最大的度数(3)叶结点(Leaf):度为0的结点(4)父...
分类:其他好文   时间:2015-01-13 14:18:31    阅读次数:104
[C++]LeetCode: 91 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-12 19:24:15    阅读次数:170
924条   上一页 1 ... 66 67 68 69 70 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!