prices = [1, 2, 3, 0, 2] in the example,
transactions = [buy, buy, sell, cooldown, doNothing] meet the requirement?
On day 2 I have two stocks and day 3 selling them I get 6 dollars.
Is "You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again)." not clear enough?
unfortunately it's not clear enough to me. What does it mean by "at the same time"? Accurate to day or second? In my transactions there are no multiple transactions on the same day. In addition, I always sell after buy. Does it what the ie part mean?
"At the same time" means at the same time. You can't have two stocks at the same time.
And "you must sell the stock before you buy again" means you must sell the stock before you buy again. (Because otherwise you'd have two stocks at the same time.)
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.