码迷,mamicode.com
首页 >  
搜索关键字:largest    ( 1413个结果
LeetCode:Largest Number(Greedy)
problem: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 f...
分类:其他好文   时间:2015-07-08 17:51:23    阅读次数:115
【To Read】
Maximal RectangleGiven a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.一道超难的题目,思想难,同时实现...
分类:其他好文   时间:2015-07-08 14:34:30    阅读次数:156
【LeetCode】215. Kth Largest Element in an Array (2 solutions)
Kth Largest Element in an ArrayFind thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the ...
分类:其他好文   时间:2015-07-07 18:42:27    阅读次数:98
[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...
分类:其他好文   时间:2015-07-06 19:44:47    阅读次数:115
[LeetCode][JavaScript]Largest Number
Largest NumberGiven a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the larg...
分类:编程语言   时间:2015-07-06 14:09:52    阅读次数:130
084 Largest Rectangle In Histogram
这道题有两个做法 总体来说都是O(n) 但是第二个方法是第一个的简化版方法一:l[i] = max(j) 其中a[j], a[j+1], ...,a[i-1] a[i+1], ... ,a[j]dif[i] = r[i] - l[i]area[i] = a[i] * dif[i]最大的area[i....
分类:其他好文   时间:2015-07-06 07:46:29    阅读次数:109
面试题33:把数组排成最小的数
题目:输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这3个数字能排成的最小数字321323.参见LeetCode-Largest Number。
分类:编程语言   时间:2015-07-05 18:16:56    阅读次数:107
215 Kth Largest Element in an Array
我会说我直接用了 heapq这么无耻的方法吗 :) 这道题应该直观用heap 复杂度为O(nlgk)1 import heapq2 class Solution:3 # @param {integer[]} nums4 # @param {integer} k5 # @ret...
分类:其他好文   时间:2015-07-04 13:53:51    阅读次数:112
【Linear Support Vector Machine】林轩田机器学习技法
首先从介绍了Large_margin Separating Hyperplane的概念。(在linear separable的前提下)找到largest-margin的分界面,即最胖的那条分界线。下面开始一步步说怎么找到largest-margin separating hyperplane。接下来...
分类:系统相关   时间:2015-07-02 22:21:01    阅读次数:239
poj2559 Largest Rectangle in a Histogram
题意: 求最大矩形面积。思路: 维护单调递增的矩形高度,当出现不能维护单调性的数加入时,开始维护面积累计ans ans = max{ans , 当前矩形高度×当前位置到最右的宽度};最后再加入0,清空栈。ps:跪jzt学长/。\ 1 #include 2 #include 3 using na...
分类:其他好文   时间:2015-07-02 15:18:06    阅读次数:124
1413条   上一页 1 ... 85 86 87 88 89 ... 142 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!