Largest Rectangle in Histogram
Total Accepted: 18582 Total
Submissions: 86792My Submissions
Given n non-negative integers representing the histogram's bar height where the width of each b...
分类:
其他好文 时间:
2014-10-14 16:38:09
阅读次数:
154
[leetcode]Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area....
分类:
其他好文 时间:
2014-10-14 13:49:48
阅读次数:
148
Largest prime factor
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7009 Accepted Submission(s): 2482
Problem Description
Every...
分类:
其他好文 时间:
2014-10-13 13:10:47
阅读次数:
207
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 class Solution { 8 public: 9 int largestRectangleArea(vector &height)...
分类:
其他好文 时间:
2014-10-12 23:59:48
阅读次数:
173
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],the...
分类:
其他好文 时间:
2014-10-12 17:19:08
阅读次数:
209
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1]...
分类:
其他好文 时间:
2014-10-12 03:20:27
阅读次数:
193
题意:给定一个有向图,寻找一个点数最大集合,使得这个集合中的任意两个点 u,v, 都有u->v 或者 v->u 或者uv 思路:首先将强连通分量通过tarjan算法求出来,然后进行缩点,也就是每一个缩点 所组成的图就是一个DAG图!令每一个点的权值就是这个缩点所包含节点(也就是对应的 强连通分量的....
分类:
其他好文 时间:
2014-10-11 23:18:06
阅读次数:
393
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 histogram.
Above is a histogram where width o...
分类:
其他好文 时间:
2014-10-11 17:54:45
阅读次数:
147
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
class Solution {
public:
int largestRectangleArea(int* height, int length) {
...
分类:
其他好文 时间:
2014-10-11 17:37:26
阅读次数:
156
Maximum Subarray
Total Accepted: 28381 Total Submissions: 83696 My Submissions
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For exam...
分类:
其他好文 时间:
2014-10-09 16:27:18
阅读次数:
237