摘要: Problem Description:http://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/Basic idea: from code below, it seems super easy. But intuitively, we may use one more variable "tmp_max_profit" to record every times we get the max profit. 1 class Solution { 2 public: 3 int maxProfit( 阅读全文
posted @ 2013-10-19 14:57 假日笛声 阅读(158) 评论(0) 推荐(0) 编辑