码迷,mamicode.com
首页 >  
搜索关键字:leaf    ( 924个结果
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 ...
分类:其他好文   时间:2014-12-17 14:44:41    阅读次数:191
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}, ...
分类:其他好文   时间:2014-12-17 09:50:15    阅读次数:169
Binary Tree Level Order Traversal II
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964067 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)....
分类:其他好文   时间:2014-12-16 21:07:59    阅读次数:207
Maximum Depth of Binary Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964475 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....
分类:其他好文   时间:2014-12-16 21:07:51    阅读次数:197
[leetcode] 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-16 16:55:37    阅读次数:225
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 andsum =...
分类:其他好文   时间:2014-12-16 00:50:14    阅读次数:223
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 ...
分类:其他好文   时间:2014-12-15 21:52:22    阅读次数:124
Sum Root to Leaf Numbers
终于完成了LeetCode 上AC率在30%以上的题目,这道题是最后一道,纪念一下。 原题是这个样子的: 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...
分类:其他好文   时间:2014-12-14 00:49:21    阅读次数:157
Path Sum
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41910495 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. 思路: (1)题意为给定一个(每个节点带有数值)二叉...
分类:其他好文   时间:2014-12-13 18:04:21    阅读次数:176
LeetCode 刷题之二:寻找二叉树的最大深度
题目为: 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. 阶梯思路:对于这种题目最简单的方法就是递归操作了...
分类:其他好文   时间:2014-12-12 23:40:13    阅读次数:374
924条   上一页 1 ... 70 71 72 73 74 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!