摘要: 这道题想了很多,但是想多了。这个题思路很简单,如果当前值大于最小值,就计算差,和最大利润值比较。 1 class Solution { 2 public: 3 int maxProfit(vector &prices) { 4 if(prices.size()==0) 5 ... 阅读全文
posted @ 2015-02-04 20:57 醉剑客 阅读(133) 评论(0) 推荐(0) 编辑