123. 买卖股票的最佳时机 III 题目描述
class Solution:
def maxProfit(self, prices: List[int]) -> int:
preProfit = 0
profits = []
for i in range(1, len(prices)):
curProfit = prices[i] - prices[i-1]
if curProfit > 0:
if preProfit
关注
打赏