You are given an array, prices, where prices[i] represents the stock price on day
Determine the maximum profit you can achieve by making at most two transactions. Each transaction consists of a single buy followed by a single sell.
Note: Each transaction must be completed before starting another, i.e, you must sell the stock before making a new purchase, and only one stock can be held at any time.
Constraints:
prices.length
prices[i]
You are given an array, prices, where prices[i] represents the stock price on day
Determine the maximum profit you can achieve by making at most two transactions. Each transaction consists of a single buy followed by a single sell.
Note: Each transaction must be completed before starting another, i.e, you must sell the stock before making a new purchase, and only one stock can be held at any time.
Constraints:
prices.length
prices[i]