题目: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
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-09 01:08:37
阅读次数:
231
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,...
分类:
编程语言 时间:
2014-10-09 00:23:07
阅读次数:
218
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] ha...
分类:
其他好文 时间:
2014-10-08 18:06:55
阅读次数:
163
题目:Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product. For example, g...
分类:
其他好文 时间:
2014-10-05 21:45:29
阅读次数:
198
Flip Game
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 31227
Accepted: 13583
Description
Flip game is played on a rectangular 4x4 field with two-sided pie...
分类:
其他好文 时间:
2014-10-05 17:50:38
阅读次数:
319