Best Time to Buy and Sell Stock with Cooldown | LeetCode 309 | C++, Java, Python

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 38

  • @maheshreddy4080
    @maheshreddy4080 3 роки тому +3

    The state diagram really helped ,can't say why it works but your explanation is awesome

  • @jonathanlee3020
    @jonathanlee3020 4 роки тому +4

    Thank You. Could you kindly do one for "188. Best Time to Buy and Sell Stock IV" using that state transition algo?

  • @chetanpatteparapu7600
    @chetanpatteparapu7600 3 роки тому

    Thank you for this problem. Can you please make a video on "Best Time to Buy and Sell Stock IV"?

  • @SwetankRaj
    @SwetankRaj 3 місяці тому

    Nice explanation with fabulous approach.

  • @pratyushranjansahu9495
    @pratyushranjansahu9495 4 роки тому +1

    I was going through the explanation ..It was difficult for the first time but slowly..i was able to getting it...
    Thanks. Learning around more than 100 problems from u , during this lock down..

  • @sakthim7160
    @sakthim7160 4 роки тому +1

    Clean and clear explanation. Thank you so much to knowledge center.

  • @harigovind11
    @harigovind11 3 роки тому +1

    Great explanation as always. Minor point is variables could be more readable.

    • @KnowledgeCenter
      @KnowledgeCenter  3 роки тому

      Thanks. Yes. variable names can be made better.

  • @akshay6943
    @akshay6943 4 роки тому

    Subscribed! Can you share the logic to get the path also ?

  • @zhaoningzhang7116
    @zhaoningzhang7116 4 роки тому +1

    Pretty clear explanation. Thanks much sir.

  • @toaster307
    @toaster307 4 роки тому +1

    Thanks so much! I watch your videos everyday :)

  • @mhaesh
    @mhaesh 4 роки тому

    Can you please make video for transaction fee problem also

  • @vivanverma5060
    @vivanverma5060 4 роки тому +1

    Amazing explanation, thank you 🙌🏽

  • @vaishalirathore3723
    @vaishalirathore3723 3 роки тому

    how is the state approach taking cooldown into account?

  • @abhishekkumar-bv9tv
    @abhishekkumar-bv9tv 4 роки тому +2

    your videos are great. It really helps a lot. but It's really difficult to understand your last few videos since the explanation is not clear.and also video length is getting longer, if possible please try to make it short (max ~= 15 min)

  • @RishiRaj-dl1mg
    @RishiRaj-dl1mg 4 роки тому

    At 8:55 why you have started B from -1, since b can come from prev_b which is 0 and better than -1?

  • @AlokKumar-jh8wp
    @AlokKumar-jh8wp 4 роки тому +1

    Amazing sir it is well crafted explanation.

  • @0anant0
    @0anant0 4 роки тому +1

    Is my understanding correct? (plz explain, if wrong)
    for ith day,
    A = max money (accumulated) so far
    B = max money after buy
    C = max money after sell = max profit
    Thanks!

  • @ijaz2020
    @ijaz2020 4 роки тому +2

    Reloading!. Reloading! Reloading.! Finally Tada!! :D

  • @nikhilnischal4019
    @nikhilnischal4019 4 роки тому +1

    Loved it

  • @devashishd5081
    @devashishd5081 4 роки тому +2

    Keep up the good work!

  • @janmichaelaustria620
    @janmichaelaustria620 4 роки тому +1

    Thank you again sir!

  • @srikantsharma6430
    @srikantsharma6430 4 роки тому +1

    Nice explanation!

  • @MYUCOZ1
    @MYUCOZ1 3 роки тому

    what if we have "k" number of days as cool down period

  • @shivanktripathi4661
    @shivanktripathi4661 4 роки тому

    how can we backtrack from the result.......

  • @manthankhorwal1477
    @manthankhorwal1477 4 роки тому +3

    Not a good explanation

    • @gouravgoel2974
      @gouravgoel2974 4 роки тому

      DO YOU KNOW HOW MUCH EFFORT IT TAKES, FOOL!🤬

    • @manthankhorwal1477
      @manthankhorwal1477 4 роки тому

      @@gouravgoel2974 am i asking you ? just giving my feedback about the video ... Idiot

    • @KnowledgeCenter
      @KnowledgeCenter  4 роки тому

      No need to fight guys. I'll try to make it more clearer in future videos. Thanks for the feedback.