You need to find the largest value in each row of a binary tree. Example: 这道题让我们找二叉树每行的最大的结点值,那么实际上最直接的方法就是用层序遍历,然后在每一层中找到最大值,加入结果res中即可,参见代码如下: 解法一: ...
分类:
其他好文 时间:
2017-02-20 00:57:18
阅读次数:
159
The Worm Turns Problem Description Winston the Worm just woke up in a fresh rectangular patch of earth. The rectangular patch is divided into cells, a ...
分类:
其他好文 时间:
2017-02-18 00:53:39
阅读次数:
296
For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i ...
分类:
其他好文 时间:
2017-02-12 18:47:13
阅读次数:
126
Winston the Worm just woke up in a fresh rectangular patch of earth. The rectangular patch is divided into cells, and each cell contains either food o ...
分类:
其他好文 时间:
2017-02-07 12:43:12
阅读次数:
298
Picture Time Limit: 2000MS Memory Limit: 10000K Total Submissions: 12265 Accepted: 6484 Description A number of rectangular posters, photographs and o ...
分类:
其他好文 时间:
2017-02-05 11:25:51
阅读次数:
202
Problem DescriptionYou may not know this but it's a fact that Xinghai Square is Asia's largest city square. It is located in Dalian and, of course, a ...
分类:
其他好文 时间:
2017-02-03 20:48:18
阅读次数:
274
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. For example, given the following ma ...
分类:
其他好文 时间:
2017-02-03 10:50:18
阅读次数:
149
For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i ...
分类:
其他好文 时间:
2017-01-31 17:48:24
阅读次数:
319
For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i... ...
分类:
其他好文 时间:
2017-01-30 22:47:38
阅读次数:
264
Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area o ...
分类:
编程语言 时间:
2017-01-29 15:26:52
阅读次数:
185