leecode 122 买卖股票的最佳时机 II
func maxProfit(prices []int) int { var result int for i:= 1; i < len(prices); i++{ if prices[i] - prices[i-1] > 0 { result += prices[i] - prices[i-1] } } return result}方案二:func maxProfit(prices []int)





