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

  Рет қаралды 6,313

Knowledge Center

Knowledge Center

Күн бұрын

Пікірлер: 38
@maheshreddy4080
@maheshreddy4080 3 жыл бұрын
The state diagram really helped ,can't say why it works but your explanation is awesome
@KnowledgeCenter
@KnowledgeCenter 3 жыл бұрын
Thanks for the compliment.
@jonathanlee3020
@jonathanlee3020 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"?
@0anant0
@0anant0 4 жыл бұрын
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!
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Yes. Can think like that.
@sakthim7160
@sakthim7160 4 жыл бұрын
Clean and clear explanation. Thank you so much to knowledge center.
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
You are welcome!
@SwetankRaj
@SwetankRaj 3 ай бұрын
Nice explanation with fabulous approach.
@harigovind11
@harigovind11 3 жыл бұрын
Great explanation as always. Minor point is variables could be more readable.
@KnowledgeCenter
@KnowledgeCenter 3 жыл бұрын
Thanks. Yes. variable names can be made better.
@vaishalirathore3723
@vaishalirathore3723 3 жыл бұрын
how is the state approach taking cooldown into account?
@toaster307
@toaster307 4 жыл бұрын
Thanks so much! I watch your videos everyday :)
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Keep writing code on daily basis. It helps.
@abhishekkumar-bv9tv
@abhishekkumar-bv9tv 4 жыл бұрын
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)
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Sorry about that
@abhishekkumar-bv9tv
@abhishekkumar-bv9tv 4 жыл бұрын
@@KnowledgeCenter There is nothing to be sorry about, you are doing great.keep going!
@akshay6943
@akshay6943 4 жыл бұрын
Subscribed! Can you share the logic to get the path also ?
@zhaoningzhang7116
@zhaoningzhang7116 4 жыл бұрын
Pretty clear explanation. Thanks much sir.
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Glad it helped
@AlokKumar-jh8wp
@AlokKumar-jh8wp 4 жыл бұрын
Amazing sir it is well crafted explanation.
@devashishd5081
@devashishd5081 4 жыл бұрын
Keep up the good work!
@vivanverma5060
@vivanverma5060 4 жыл бұрын
Amazing explanation, thank you 🙌🏽
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Glad it was helpful!
@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?
@ijaz2020
@ijaz2020 4 жыл бұрын
Reloading!. Reloading! Reloading.! Finally Tada!! :D
@mhaesh
@mhaesh 4 жыл бұрын
Can you please make video for transaction fee problem also
@MYUCOZ1
@MYUCOZ1 3 жыл бұрын
what if we have "k" number of days as cool down period
@pratyushranjansahu9495
@pratyushranjansahu9495 4 жыл бұрын
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..
@nikhilnischal4019
@nikhilnischal4019 4 жыл бұрын
Loved it
@janmichaelaustria620
@janmichaelaustria620 4 жыл бұрын
Thank you again sir!
@shivanktripathi4661
@shivanktripathi4661 4 жыл бұрын
how can we backtrack from the result.......
@srikantsharma6430
@srikantsharma6430 4 жыл бұрын
Nice explanation!
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Thanks!
@manthankhorwal1477
@manthankhorwal1477 4 жыл бұрын
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.
DP 36. Buy and Sell Stock - II | Recursion to Space Optimisation
35:34
take U forward
Рет қаралды 244 М.
Best time to buy and sell stock with cooldown | Leetcode #309
34:31
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 26 МЛН
Who's spending her birthday with Harley Quinn on halloween?#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 18 МЛН
Best Time to Buy and Sell Stock iii | LeetCode 123 | C++, Java, Python
20:16
309. Best Time to Buy and Sell Stock with Cooldown
11:52
Best Time to Buy and Sell a Stock II - Leetcode 122 - Python
6:34
Perfect Squares | LeetCode 279 | C++, Java, Python
18:03
Knowledge Center
Рет қаралды 10 М.
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 26 МЛН