http://www.geeksforgeeks.org/bottom-view-binary-tree/Bottom View of a Binary TreeGiven a Binary Tree, we need to print the bottom view from left to ri...
分类:
其他好文 时间:
2015-07-22 16:00:20
阅读次数:
109
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
思路:此题的意思是给一个为0或1的矩阵,求全部为1组成的最大矩阵的面积。
此题可以巧妙转化为求最大直方图面积的问题。
public class S...
分类:
其他好文 时间:
2015-07-22 14:37:08
阅读次数:
98
03-树3. Tree Traversals Again (25)
时间限制
200 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
An inorder binary tree traversal can...
分类:
其他好文 时间:
2015-07-22 10:46:23
阅读次数:
303
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:
其他好文 时间:
2015-07-22 01:31:38
阅读次数:
118
Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for a binary tree node. * public cla...
分类:
其他好文 时间:
2015-07-21 23:53:37
阅读次数:
176
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for singly-linked list. ...
分类:
其他好文 时间:
2015-07-21 23:47:06
阅读次数:
145
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:
其他好文 时间:
2015-07-21 23:44:58
阅读次数:
124
Problem Definition:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as abinary tree ...
分类:
其他好文 时间:
2015-07-21 22:13:12
阅读次数:
116
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree./** * Definitio...
分类:
其他好文 时间:
2015-07-21 22:12:02
阅读次数:
108
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree./** * Definiti...
分类:
其他好文 时间:
2015-07-21 22:02:45
阅读次数:
96