You are given an array prices where prices[i] is the price of a stock on day i . You may complete as many transactions as you like (buy then sell), but you can only hold one share at a time and you may not buy on the day right after a sale (a one-day cooldown). Return the maximum profit you can achieve. Input format Input is a single array, e.g. [[1,2,3,0,2]] .