Don't understand the question


  • 0
    G

    For prices = [1, 2, 3, 0, 2] in the example,

    Does 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.


  • 0

    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?


  • 0
    G

    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?


  • 0
    This post is deleted!

  • 0

    "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.)


  • 0
    G

    Then can I do nothing on one day?


  • 0

    Yes, you can do nothing on as many days as you want.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.