Given daily stock prices and a fixed transaction fee charged per completed transaction, you may complete unlimited transactions. Return the maximum profit. The input is JSON {prices, fee}.
Input: JSON {prices, fee}.
Output: Integer — the maximum profit.
Input: {"prices":[1,3,2,8,4,9],"fee":2}
Output: 8
Explanation: Two transactions after fees.Input: {"prices":[1,3,7,5,10,3],"fee":3}
Output: 6
Explanation: Optimal after fees.Input: {"prices":[1],"fee":1}
Output: 0
Explanation: No transaction.1<=n<=5*10^40<=fee<=5*10^4