题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com....
分类:
编程语言 时间:
2014-07-30 05:35:03
阅读次数:
309
题目: 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...
分类:
编程语言 时间:
2014-07-30 05:34:43
阅读次数:
319
CiscoCatalyst2960,3750G交换机12.2版本的ios默认关闭ipdevicetracking.但是CiscoCatalyst2960s和3750x交换机升级到15.2的版本后,默认已开启ipdevicetracking,而且全局模式下无法关闭它,如果不关闭的话,在级联的trunk端口上我们showmacadd,可以看到这样的情形,对端交换..
分类:
其他好文 时间:
2014-07-28 00:40:20
阅读次数:
189
LeetCode: Max Points on a LineGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.地址:https://oj.leetcod...
分类:
其他好文 时间:
2014-07-27 23:22:59
阅读次数:
289
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-07-27 09:49:52
阅读次数:
237
很久之前就想攻克一下网络流的问题了,一直拖着,一是觉得这部分的内容好像非常高级,二是还有很多其他算法也需要学习,三是觉得先补补相关算法会好点
不过其实这虽然是图论比较高级的内容,但是基础打好了,那么还是不会太难的,而且它的相关算法并不多,熟悉图论之后就可以学习了,就算法不会二分图也可以学习。
这里使用Ford-Fulkerson算法,其实现的方法叫做:Edmonds-Karp
Algori...
分类:
其他好文 时间:
2014-07-26 17:22:32
阅读次数:
413
1.model specificationbinomial logistic regression model是一种分类模型。条件概率分布为: 伯努利分布其中, 2.Maximum Likelihood Estimation由于Hessian矩阵正定,因此NLL是个凸函数,有全局最小值。可以使用梯度...
分类:
其他好文 时间:
2014-07-26 14:11:14
阅读次数:
196
Description
There is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference between the maximum element and the minimum element ...
分类:
其他好文 时间:
2014-07-25 11:06:41
阅读次数:
242
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:
编程语言 时间:
2014-07-24 10:25:36
阅读次数:
227
Maximum Sum大意:给你一个n*n的矩阵,求最大的子矩阵的和是多少。思路:最开始我想的是预处理矩阵,遍历子矩阵的端点,发现复杂度是O(n^4),就不知道该怎么办了。问了一下,是压缩矩阵,转换成最大字段和的问题。压缩行或者列都是可以的。 1 int n, m, x, y, T, t; 2 in...
分类:
其他好文 时间:
2014-07-24 07:10:58
阅读次数:
211