You are given an array prices where prices[i] is the price of a stock on the i-th day and an integer fee representing a transaction fee. Find the maximum profit you can achieve. You may complete as many transactions as you like, but you must pay the transaction fee for each transaction and cannot engage in multiple transactions at the same time.
Click Run to execute sample tests.