码迷,mamicode.com
首页 >  
搜索关键字:binary tree upside d    ( 23249个结果)
Utopian Tree in Java
The Utopian tree goes through 2 cycles of growth every year. The first growth cycle occurs during the monsoon, when it doubles in height. ...
分类:编程语言   时间:2014-10-04 14:20:56    阅读次数:238
LeetCode My Solution: Minimum Depth of Binary Tree
Minimum Depth of Binary Tree  Total Accepted: 24760 Total Submissions: 83665My Submissions Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the ...
分类:其他好文   时间:2014-10-04 12:50:06    阅读次数:146
sicily 1156 二叉树的遍历 前序遍历,递归,集合操作
1156. Binary treeConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionYour task is very simple: Given a binary tree, every node of which conta...
分类:其他好文   时间:2014-10-04 03:10:25    阅读次数:202
[Leetcode][JAVA] Binary Tree Preorder Traversal, Binary Tree Inorder Traversal, Binary Tree Postorder Traversal
Binary Tree PreOrder Traversal:Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ...
分类:编程语言   时间:2014-10-04 02:51:25    阅读次数:285
BZOJ3391: [Usaco2004 Dec]Tree Cutting网络破坏
3391: [Usaco2004 Dec]Tree Cutting网络破坏Time Limit:1 SecMemory Limit:128 MBSubmit:47Solved:37[Submit][Status]Description约翰意识到贝茜建设网络花费了他巨额的经费,就把她解雇了.贝茜很愤怒...
分类:其他好文   时间:2014-10-04 02:28:55    阅读次数:290
Leetcode:minimum_depth_of_binary_tree题解
和求最深二叉树相似,给定一个二叉树,求它的最小深度。最小深度是沿从根节点,到叶节点最短的路径。...
分类:其他好文   时间:2014-10-04 01:58:35    阅读次数:154
Leetcode:maximum_depth_of_binary_tree题解
给定一个二叉树,求它的最大深度。最大深度是沿从根节点,到叶节点最长的路径。...
分类:其他好文   时间:2014-10-04 01:10:05    阅读次数:186
LeetCode:same_tree题解
给定两个二叉树,编写一个函数来检查它们是否相等或为空树。 如果两个二叉树被认为是相等的,那么它们在结构上是相同的,并且任意节点具有相同的值。...
分类:其他好文   时间:2014-10-04 00:12:55    阅读次数:219
【Leetcode】Binary Tree Traversal
把三个二叉树遍历的题放在一起了。递归写法太简单,就不再实现了,每题实现了两种非递归算法。一种是利用栈,时间和空间复杂度都是O(n)。另一种是借助线索二叉树,也叫Morris遍历,充分利用树中节点的空指针域。先序:Binary Tree Preorder TraversalGiven a binary...
分类:其他好文   时间:2014-10-03 23:07:55    阅读次数:341
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}, ...
分类:其他好文   时间:2014-10-03 19:41:45    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!