The development tools Best time to buy and sell stocks II December 12, 2023 by Miss Chloe Perry No Comments Class Solution(object): def maxProfit(self, prices): “” :type prices: List[int] : Int “” zong = 0 for I in range(len(prices)-1): if prices[I +1]>prices[I]: zong+= (prices[I +1]-prices[I]) return zong