Medium
Given daily stock prices, maximize profit with as many transactions as you like, but after you sell you must cooldown one day before buying again. Return the max profit.
Input: prices = [1,2,3,0,2] Output: 3 Explanation: buy, sell, cooldown, buy, sell.
Input: prices = [1] Output: 0