You are given an array named prices where each element represents the price of a stock on a given day. Your task is to determine the maximum profit you can achieve by completing at most two transactions. Remember, you cannot hold multiple stocks simultaneously; you must sell before buying again.
Click Run to execute sample tests.