2014年5月26日

LeetCode --- Best Time to Buy and Sell Stock II

摘要: 题目链接附上代码: 1 class Solution { 2 public: 3 int maxProfit(vector &prices) { 4 unsigned int len = prices.size(); 5 if (len == 0) retur... 阅读全文

posted @ 2014-05-26 23:50 Stomach_ache 阅读(109) 评论(0) 推荐(0)

LeedCode --- Best Time to Buy and Sell Stock

摘要: 题目链接题意: find the maximum positive difference between the price on the ith day and the jth day附上代码: 1 class Solution { 2 public: 3 int maxProfit(ve... 阅读全文

posted @ 2014-05-26 17:19 Stomach_ache 阅读(156) 评论(0) 推荐(0)

导航