摘要:
转载:http://blog.csdn.net/fightforyourdream/article/details/14503469题目:最佳时间买入卖出股票:你有一个数组保存了股票在第i天的价钱,现在你最多进行两次买卖,但同一时间你手上只能保持一个股票,如何赚的最多思路:知道要用DP做,但是一开始... 阅读全文
摘要:
http://blog.unieagle.net/category/develop/%E7%AE%97%E6%B3%95/ 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
java ReplaceAll 的两个参数都必须是正则表达式。在正则表达式中 \ (一个斜线)是用 \\ 来表示(即:用两个斜线表示一个斜线) 而在Java语言中 \ (一个斜线)是用 \\ 来表示。(即:也用两个斜线表示一个斜线) 所以正则表达式为两个斜线("\\")的写法,在Java语言中要用4... 阅读全文