The World's Largest BitTorrent System ...
分类:
其他好文 时间:
2016-12-24 22:46:03
阅读次数:
194
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. For example, given the following ...
分类:
其他好文 时间:
2016-12-23 01:43:03
阅读次数:
136
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:
其他好文 时间:
2016-12-23 01:19:30
阅读次数:
137
【题目分析】 本来是单调栈的题目,用笛卡尔树可以快速的水过去。 把每一个矩阵看成一个二元组(出现的顺序,高度)。 然后建造笛卡尔树。 神奇的发现,每一个节点的高度*该子树的大小,就是这一块最大的子矩阵的可能解。 用二元组的第一个下标来限制,使它们在一块儿,然后堆的性质又限制了宽度以及高度。 计算,取 ...
分类:
其他好文 时间:
2016-12-21 02:00:46
阅读次数:
145
1. Maximum Subarray (#53) Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given ...
分类:
其他好文 时间:
2016-12-17 11:39:35
阅读次数:
188
Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed n ...
分类:
其他好文 时间:
2016-12-16 07:59:19
阅读次数:
184
refer to https://discuss.leetcode.com/topic/36995/share-my-o-n-java-code-with-brief-explanation-and-comments/2 这道题不好从root到leaf一层一层限制subtree取值范围,因为有可能p ...
分类:
其他好文 时间:
2016-12-15 07:36:46
阅读次数:
263
85. Maximal Rectangle Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. For exampl ...
分类:
其他好文 时间:
2016-12-12 14:08:17
阅读次数:
154
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],th ...
分类:
其他好文 时间:
2016-12-12 01:36:49
阅读次数:
186
http://poj.org/problem?id=1979 Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is ...
分类:
其他好文 时间:
2016-12-07 20:03:53
阅读次数:
304