One question about this exercise


  • 0
    V

    The requirement says "After you sell your stock, you cannot buy stock on next day. (ie, cooldown 1 day)" , but can I sell the stock on next day ? Taking the given example prices=[1,2,3,0,2] , it seems if I'm allowed to sell, I would get maxprofit as 4. so... does 'cooldown' mean TOTAL ban of doing any transaction ? if so it should state more clearly in the exercise.


  • 0
    A

    Cooldown means no transaction(buy/sell) on that day.


  • 0
    V

    yes I guess so from the given example. I'm only saying the requirement should be clearer, not just "You cannot buy stock on next day" , that gives me an impression I can still sell...


  • 0
    W

    If you sell your stock, you have no stock in hand, so you have nothing to sell in the next day. You can't borrow stock for selling.


  • 0
    V

    After you sell your stock , you can buy the stock on the SAME day, right ?


Log in to reply
 

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