题目链接题意: find the maximum positive difference
between the price on the ith day and the jth day附上代码: 1 class Solution { 2
public: 3 int maxProfit(ve...
分类:
其他好文 时间:
2014-05-28 03:49:45
阅读次数:
307
原题地址:https://oj.leetcode.com/problems/climbing-stairs/题意:You
are climbing a stair case. It takesnsteps to reach to the top.Each time you can
either cl...
分类:
编程语言 时间:
2014-05-28 03:27:49
阅读次数:
267
#!/bin/bash# Program to output a go source file
with user informationCURRENT_TIME=$(date +"%x %r %Z")cat <<
EOF/* Author:$USER CreatedAt:$CURRENT_TIME...
分类:
其他好文 时间:
2014-05-27 17:49:29
阅读次数:
283
You could use:Calendar c
=Calendar.getInstance();int seconds = c.get(Calendar.SECOND);There are plenty of
constants in Calendar for everything you nee...
分类:
移动开发 时间:
2014-05-27 17:13:56
阅读次数:
512
运维的同学和Team里面的一个同学分别遇到过Nginx在线上环境使用中会遇到TIME_WAIT过高或者CLOSE_WAIT过高的状态先从原因分析一下为什么,问题就迎刃而解了。首先是TIME_WAIT:
理解一下TIME_WAIT状态产生的原因,这个问题已经被很多很多的书说烂了,但是为什么很多人还是....
分类:
其他好文 时间:
2014-05-26 18:28:19
阅读次数:
388
We are the World词曲:Michael Jackson & Lionel
RichThere comes a time when we heed a certain call (Lionel Richie 莱昂纳尔.里奇)When
the world must come togethe...
分类:
其他好文 时间:
2014-05-26 17:07:17
阅读次数:
266
一次nginx 504 Gateway
Time-out错误排查、解决记录,经过反复检查,发现造成这个问题的原因就是PHP的CURL没有设置超时时间,解决办法只要设置超时时间或者修改一下nginx的配置即可解决。记一次莫名其妙的网站失去响应排查。之前网站一直是使用nginx做代理后端的apache运...
分类:
其他好文 时间:
2014-05-26 16:45:50
阅读次数:
276
FatMouse' Trade
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 40975 Accepted Submission(s): 13563
Problem Description
FatMouse pre...
分类:
其他好文 时间:
2014-05-25 21:58:33
阅读次数:
400
<?php
/*--------------------编写自己的缓存类---------------*/
class my_cache{
//定义有关变量
private $cache_time;//缓存有效时间
private $cache_file;//缓存文件保存路径
//初始化类,默认是index.html时间是1
function __construc...
分类:
Web程序 时间:
2014-05-25 21:54:23
阅读次数:
328
FatMouse' Trade
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 40975 Accepted Submission(s): 13563
Problem Description
FatMouse pre...
分类:
其他好文 时间:
2014-05-25 21:54:02
阅读次数:
288