Best Time to Buy and Sell Stock with Transaction Fee
类似的股票问题求在低价格买入股票,高价格卖出。每次卖出会产生交易费,求最优解例如:Input:prices=[1,3,2,8,5,4,9],fee=2Output:8Explanation:Themaximumprofitcanbeachievedby:•Buyingatprices[0]=1•Sellingatprices[3]=8•Buyingatprices[5]=4•Sellingatpr