Hard
Given an array prices where prices[i] is the stock price on day i, return the maximum profit you can achieve with at most two transactions. You may not hold more than one share at a time (you must sell before you buy again).
Input: prices = [3,3,5,0,0,3,1,4] Output: 6
Input: prices = [1,2,3,4,5] Output: 4
Input: prices = [7,6,4,3,1] Output: 0