Best Time to Buy and Sell Stock III
摘要:
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 at mosttwotransactions.Note:You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).思路:将vector分 阅读全文
posted @ 2013-11-09 23:47 waruzhi 阅读(166) 评论(0) 推荐(0) 编辑