码迷,mamicode.com
首页 >  
搜索关键字:largest    ( 1413个结果
leetcode -- Maximum Subarray
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]...
分类:其他好文   时间:2015-03-14 10:59:57    阅读次数:122
Lintcode: Maximum Subarray Difference
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 ...
分类:其他好文   时间:2015-03-14 06:11:46    阅读次数:565
Lintcode: Maximum Subarray II
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 ...
分类:其他好文   时间:2015-03-14 06:10:35    阅读次数:198
[LeetCode]Maximum Product Subarray
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 contiguous subarray [2,3] has th...
分类:其他好文   时间:2015-03-13 23:49:17    阅读次数:249
[LeetCode] Largest Number 排序
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 num...
分类:编程语言   时间:2015-03-13 20:39:38    阅读次数:163
LeetCode Maximum Subarray
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...
分类:其他好文   时间:2015-03-13 00:28:08    阅读次数:187
【LeetCode】Maximum Subarray
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 largest sum = 6....
分类:其他好文   时间:2015-03-12 22:42:13    阅读次数:158
LeetCode Maximum Subarray
1.题目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...
分类:其他好文   时间:2015-03-12 11:38:49    阅读次数:120
hdu 1506 Largest Rectangle in a Histogram 单调队列
题意: 输入n个柱子,并排放。问最大的矩形面积。 要维护两个单调队列,lft和rit。lft [i]表示i点,左边连续有比i点高的柱子的话,把最左边的柱子编号记录在lft [i]。 rit 同理,记录i的最右边连续比i高的柱子的编号。 第一个案例: id 1 2 3 4 5 6 7 h 2 1 4 5 1 3 3 lft 1 1 3 4 1 6 6 rit 1 7 4 4 7 7 7 有了lft 和rit 就可枚举每一列计算那一列向两遍扩展的最大的宽了。再乘上该列的高,就是包含该列的最大的面积了。...
分类:其他好文   时间:2015-03-10 23:19:06    阅读次数:400
Leetcode 53. Maximum Subarray
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,...
分类:其他好文   时间:2015-03-10 19:07:17    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!