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 complet...
分类:
编程语言 时间:
2015-05-26 17:59:30
阅读次数:
176
http://www.lintcode.com/en/problem/longest-increasing-continuous-subsequence-ii/# Give you an integer matrix (with row size n, column size m),find the...
分类:
其他好文 时间:
2015-05-26 17:54:40
阅读次数:
123
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" hr...
分类:
Web程序 时间:
2015-05-26 16:39:35
阅读次数:
286
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 complet...
分类:
编程语言 时间:
2015-05-26 15:42:45
阅读次数:
157
string(66) “exception: aggregation result exceeds maximum document size (16MB)”我用aggregation 从mongo中取数据,当超过16M 时候,就报错了。我已经好多次超多了16M。愁。...
分类:
Web程序 时间:
2015-05-26 12:43:12
阅读次数:
160
http://www.lintcode.com/en/problem/longest-increasing-continuous-subsequence/# Give you an integer array (index from 0 to n-1, where n is the size of ...
分类:
其他好文 时间:
2015-05-26 12:19:11
阅读次数:
144
#include#includeint main(){ char s[100001],t[100001]; char *p1,*p2; while(scanf("%s%s",s,t)!=EOF) { p1=s; p2=t; while...
分类:
其他好文 时间:
2015-05-25 23:57:27
阅读次数:
158
No.149 Max Point on a LineGivennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.法一:考虑不周,一条直线上的点会重复计数,但没找到解决...
分类:
其他好文 时间:
2015-05-25 23:56:17
阅读次数:
150
遇到了这个js异常, 总是吧浏览器搞崩溃,这是什么原因呢?开始我也只能想到死循环, 也许是哪个条件判断写错了,其实不是。经过google,发现了一篇文章,内容请看:=================================================================文章地...
分类:
Web程序 时间:
2015-05-25 21:59:56
阅读次数:
309
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.经过同一个点且斜率相等的直线一定是同一条直线,所以我们只要分别计算每一个点与其它点的直线的斜率,统计斜率的...
分类:
其他好文 时间:
2015-05-25 16:01:04
阅读次数:
126