python maxProfit 最佳买股票时机
class Solution: def maxProfit(self,prices): res = 0 for i in range(len(prices)): for j in range(i,len(prices)-i): if prices[j]>prices[i]: res=prices[j]-prices[i] return res.