摘要:
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( 阅读全文