摘要: 转载:http://blog.csdn.net/fightforyourdream/article/details/14503469题目:最佳时间买入卖出股票:你有一个数组保存了股票在第i天的价钱,现在你最多进行两次买卖,但同一时间你手上只能保持一个股票,如何赚的最多思路:知道要用DP做,但是一开始... 阅读全文
posted @ 2014-05-09 15:23 一弦一仙 阅读(184) 评论(0) 推荐(0) 编辑
摘要: http://blog.unieagle.net/category/develop/%E7%AE%97%E6%B3%95/ 阅读全文
posted @ 2014-05-09 11:17 一弦一仙 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2014-05-09 11:14 一弦一仙 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie... 阅读全文
posted @ 2014-05-09 10:22 一弦一仙 阅读(142) 评论(0) 推荐(0) 编辑
摘要: java ReplaceAll 的两个参数都必须是正则表达式。在正则表达式中 \ (一个斜线)是用 \\ 来表示(即:用两个斜线表示一个斜线) 而在Java语言中 \ (一个斜线)是用 \\ 来表示。(即:也用两个斜线表示一个斜线) 所以正则表达式为两个斜线("\\")的写法,在Java语言中要用4... 阅读全文
posted @ 2014-05-09 09:23 一弦一仙 阅读(3789) 评论(0) 推荐(0) 编辑