2107:Largest Rectangle in a HistogramTime Limit: 1 SecMemory Limit: 64 MBSubmit: 777Solved: 220DescriptionA histogram is a polygon composed of a seque...
分类:
其他好文 时间:
2014-12-29 11:42:33
阅读次数:
244
Find K-th largest element in an array.NoteYou can swap elements in the arrayExampleIn array [9,3,2,4,8], the 3th largest element is 4ChallengeO(n) tim...
分类:
其他好文 时间:
2014-12-29 06:29:53
阅读次数:
116
题目:
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,...
分类:
编程语言 时间:
2014-12-28 14:17:01
阅读次数:
213
动态规划问题,每一步都分两种情况,然后选出最合适的那种
#include "iostream"
#include "memory.h"
#include "stdio.h"
using namespace std;
const int MAX = 1005;
int dp[MAX][MAX];
int largest;
int arr[MAX];
int call(int start...
分类:
其他好文 时间:
2014-12-28 13:00:31
阅读次数:
132
Given an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the largest difference.NoteThe ...
分类:
其他好文 时间:
2014-12-27 06:41:35
阅读次数:
140
求在0-1矩阵中找出面积最大的全1矩阵
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
首先,想使用遍历两次的暴力方法解决是不靠谱的,先打消这个念头。
这道题的解法灵感来自于 Larg...
分类:
编程语言 时间:
2014-12-25 22:07:52
阅读次数:
259
Given an array of integers and a number k, find k non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguou...
分类:
其他好文 时间:
2014-12-25 09:55:31
阅读次数:
235
Given an array of integers, find two non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguous.Return the ...
分类:
其他好文 时间:
2014-12-25 08:44:08
阅读次数:
232
BT(binary tree), want to find the LIS(largest independent set) of the BT. LIS: if the current node is in the set, then its children should not be in t...
分类:
其他好文 时间:
2014-12-24 08:40:08
阅读次数:
120
Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [...
分类:
其他好文 时间:
2014-12-20 20:51:21
阅读次数:
386