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] has the...
分类:
其他好文 时间:
2015-06-08 11:44:36
阅读次数:
114
Problem:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the follow...
分类:
其他好文 时间:
2015-06-07 23:31:41
阅读次数:
123
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr...
分类:
其他好文 时间:
2015-06-07 14:34:37
阅读次数:
198
L215: Kth Largest Element in an Array
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,
Gi...
分类:
其他好文 时间:
2015-06-07 09:40:21
阅读次数:
113
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 nu...
分类:
编程语言 时间:
2015-06-06 19:29:47
阅读次数:
163
Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing all 1’s and return its area.For example, given the following matrix:1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0Return...
分类:
其他好文 时间:
2015-06-06 14:59:51
阅读次数:
138
Problem:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the follow...
分类:
其他好文 时间:
2015-06-06 14:44:05
阅读次数:
88
// poj 2559 Largest Rectangle in a Histogram 栈
//
// n个矩形排在一块,不同的高度,让你求最大的矩形的面积(矩形紧挨在一起)
//
// 这道题用的是数据结构做,也可以递推做,目前只会数据结构的
//
// 对于每个高度h,求一个左边界L和右边界R,分别表示的意义是
// L是下标为j的矩形的高度的hj小于当前h的最大的j的值。则根据定义
//...
分类:
其他好文 时间:
2015-06-06 00:33:09
阅读次数:
143
Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl...
分类:
其他好文 时间:
2015-06-05 22:23:05
阅读次数:
118
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],t...
分类:
编程语言 时间:
2015-06-05 13:35:21
阅读次数:
133