Best Time To Buy & Sell Stock 1 (LeetCode 121) | Full solution with visuals and animation

  Рет қаралды 32,990

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Пікірлер: 88
@movocode
@movocode 7 ай бұрын
How come your views are so low....its literally the best explanation i am getting on youtube ....already watched few of your videos...always thinking why you are so underrated.
@sreeharsharaveendra289
@sreeharsharaveendra289 10 ай бұрын
Your clear explanation is so good. Clearly this video deserves more views, bless you!
@nikoo28
@nikoo28 9 ай бұрын
thanks for your appreciation and motivation :)
@youtubeofomkar
@youtubeofomkar 9 ай бұрын
Why are his lectures not having enough views? They are so good.
@GeetainSaar
@GeetainSaar 4 ай бұрын
Thumbnail
@Homelander_30
@Homelander_30 3 ай бұрын
They love only clickbait and trends. He is treasure, hope he start DSA course, I will buy at any cost.
@patelg6759
@patelg6759 3 ай бұрын
​@@GeetainSaar obviously this is the main reason but once you watch you'll search NIKIL lohia
@yashrajput8566
@yashrajput8566 5 ай бұрын
one of the best yet simple solution i have seen so far.
@zmonkey111
@zmonkey111 Жыл бұрын
So happen I randomly found you. Thank you for the content. You are definitely helping me understand the coding mindset.
@TheDQR
@TheDQR 9 күн бұрын
Great explanation, hands down one of the best videos explaining problems from leetcode, I will suscribe and keep watching more. I actually was able to resolve the problem with your explanation and not by looking at your code, and I tried to watch the solution of this problem in other videos. Thanks for the video man.
@MythBuster28_10
@MythBuster28_10 7 ай бұрын
This explanation deserves more views and sharing with friends and colleagues. Simply brilliant
@atmurisaimouli4697
@atmurisaimouli4697 9 ай бұрын
Mind Blowing Explaination , Very Clear and Consice
@vipulaggarwal8518
@vipulaggarwal8518 2 ай бұрын
we are learning 2 things from you in every video 1. obviously problem solving 2. how to communicate efficiently. the way you express your thoughts is phenomenal your english is so simple and easy to understand I also wants to become as good as you in communication skills.
@zeus4963
@zeus4963 16 күн бұрын
Litreally the best tutor i have ever got! Thank you so damn much bro!
@sourabhtiwari5137
@sourabhtiwari5137 9 ай бұрын
better than more phd holder, great explanation
@manansarraf73
@manansarraf73 4 ай бұрын
bhaiya whenever i got stuck in DSA you always saved me. i have watched number of videos of yours on DSA and always got the best solution always
@nikoo28
@nikoo28 4 ай бұрын
It's my pleasure
@imrn4u
@imrn4u 2 ай бұрын
great explanation with clear and concise way.
@anuradhae9146
@anuradhae9146 Жыл бұрын
really appreciate your effort to explain and how to reach to solution step by steps. It is great help. keep it up!! thanks lot
@nikoo28
@nikoo28 Жыл бұрын
you are very welcome!!
@akankshajain3997
@akankshajain3997 Жыл бұрын
such a clean explanation with visuals, thank you!
@nikoo28
@nikoo28 11 ай бұрын
so happy you like them
@kirthananambiar8873
@kirthananambiar8873 Жыл бұрын
Thank you for your great explanation..it will be great if you solve hackerank array manipulation problem
@harshitagoswami989
@harshitagoswami989 Жыл бұрын
You are a gem!
@ankitajha3962
@ankitajha3962 2 ай бұрын
Was able to code on my own
@susmitapatil4847
@susmitapatil4847 8 ай бұрын
Really Good content... Best video lecture on KZbin. Keep doing good work
@bhawnachauhan4375
@bhawnachauhan4375 9 ай бұрын
You explained so well😊
@VikashSingh-sf2xp
@VikashSingh-sf2xp 2 ай бұрын
very nice explanation.
@ajayupadhyay4964
@ajayupadhyay4964 Жыл бұрын
very underrated channel
@MuhammadAbdullahZahid-b7f
@MuhammadAbdullahZahid-b7f 4 ай бұрын
great understanding
@enriquegrageda
@enriquegrageda 8 ай бұрын
You should be a tutor or teacher, thanks for uploading :D
@anubratsahoo447
@anubratsahoo447 2 ай бұрын
Underated teacher
@hoang640
@hoang640 Жыл бұрын
Very clear explaination Thank you so much
@rohitrajsingh4638
@rohitrajsingh4638 9 ай бұрын
best explanation that i found
@shivesh.mishra
@shivesh.mishra 2 ай бұрын
As usual I respect my teachers most but. Uh got the respect from it's peak.📈❤
@tayyabsami258
@tayyabsami258 7 ай бұрын
Brother your explanation is love
@devotie_
@devotie_ Ай бұрын
😍superb explaination, tq bro 😊 tq so much😊😊😊
@riyarai9226
@riyarai9226 4 ай бұрын
Thank you so much sir, this explanation was super helpful.
@xzcgvxzcvxzcvxcv
@xzcgvxzcvxzcvxcv 8 ай бұрын
It's more better explanation than neetcode) thx
@mithic
@mithic 2 ай бұрын
brother i think even if we remove the else block and write update the currentProfit directly it should still work
@chandanaarvapally
@chandanaarvapally 3 ай бұрын
You are toooo good! Thanks a lot sir
@lymmontijo87
@lymmontijo87 Жыл бұрын
Thank you so much, this explanation was super helpful.
@InfernoisLive-i7
@InfernoisLive-i7 2 күн бұрын
Thanks
@ashok2089
@ashok2089 3 ай бұрын
Best explanation..thanks!
@devotie_
@devotie_ Ай бұрын
Excellent explaination🥰❤😊 bro
@vpvpsilly2927
@vpvpsilly2927 Жыл бұрын
great explanation....thank you sir
@manishasharma434
@manishasharma434 Жыл бұрын
Pls do cover all the parts of buy and sell problem if possible
@nikoo28
@nikoo28 Жыл бұрын
yep...I do have that on my mind 😄
@-IT-ARGHYASINGHA
@-IT-ARGHYASINGHA 7 ай бұрын
thank you very much sir nicely explained
@niom_002
@niom_002 8 ай бұрын
Great explanation ❤
@techtoss7515
@techtoss7515 Ай бұрын
excellent!!
@susanjoshi5948
@susanjoshi5948 2 ай бұрын
You are awesome!
@iftekharanam8980
@iftekharanam8980 7 ай бұрын
Thanks man. Good coding.
@MoralStories292
@MoralStories292 5 ай бұрын
the best explanation❤❤❤❤
@quantisticnumbers2633
@quantisticnumbers2633 Жыл бұрын
Thanks for the video
@aniketrawat3224
@aniketrawat3224 Жыл бұрын
Thanks, it was really helpfull...
@mohammadfahad6076
@mohammadfahad6076 Жыл бұрын
great explanation👍
@isabelgraciano9282
@isabelgraciano9282 Жыл бұрын
great video and very well explained 😃
@yaswanthreddy2623
@yaswanthreddy2623 8 ай бұрын
Thankyou sir.
@sudhadevi6692
@sudhadevi6692 Жыл бұрын
Bhaiya tussi GREAT ho!!!🎉
@nikoo28
@nikoo28 Жыл бұрын
you are great too :D
@akjha627
@akjha627 8 ай бұрын
I wrote the code myself and I am confused with the test cases...[3,2,6,5,0,3] expects the output to be 4 whereas [2,1,2,1,0,1,2] expects output to be 2. So in first testcase, the 0 price is not valid whereas in the 2nd, 0 buy price is valid ??
@nikoo28
@nikoo28 7 ай бұрын
try debugging and you will be able to follow along the step you are missing
@everyontech2716
@everyontech2716 Жыл бұрын
well explained
@hariboy123
@hariboy123 Жыл бұрын
i love your english
@TrungNguyen-eo7qz
@TrungNguyen-eo7qz 7 ай бұрын
How to find and return the indices of best day to buy and best day to sell with max profit?
@nikoo28
@nikoo28 7 ай бұрын
that is another problem...and will cover it at a later point in time
@pavankumarpadamati8606
@pavankumarpadamati8606 9 ай бұрын
nice explanation ...keep it bro🤩
@nikoo28
@nikoo28 8 ай бұрын
Thank you, I will
@kidoo1567
@kidoo1567 Жыл бұрын
U are looking like that guy who host the show "the mad" in pogo❤
@nikoo28
@nikoo28 Жыл бұрын
haha...you mean rob?
@asifkhanak7792
@asifkhanak7792 10 ай бұрын
what is the name of this algorithm?
@nikoo28
@nikoo28 9 ай бұрын
Kadane's algorithm
@raah1634
@raah1634 7 ай бұрын
@adityathakur9714
@adityathakur9714 9 ай бұрын
Sir please write code also at the last by yourself
@nikoo28
@nikoo28 9 ай бұрын
I want to focus on the problem solving part rather than the code part. Once the algorithm is clear to you...writing the code in any language isn't hard at all. Every good company you interview for...they will only be interested to judge if you are able to think logically. Plus, I also provide a production level code at the end with a dry run, full code and test cases on Github as well. So my question to you is, did you face any problems while understanding how to solve?
@adityathakur9714
@adityathakur9714 9 ай бұрын
@@nikoo28 No bhaiyaa the thing is I just started coding I understand the logic very well with your explanation but I'm not able to write in a limited time and bhaiya you explain so well that I understand the logic easily.
@nikoo28
@nikoo28 9 ай бұрын
If you have just started your coding journey…all the more reason to try and write the code yourself…follow the logic and debug along the way. Pause and take your time. No rush to just complete the number of problems.
@adityathakur9714
@adityathakur9714 9 ай бұрын
@@nikoo28 okk bhaiya i will give my best
@rajnishsingh2864
@rajnishsingh2864 Жыл бұрын
👍
@venkatesh3833
@venkatesh3833 21 күн бұрын
It's more difficult to understand why your videos are getting low views than to understand the problem 😂
@riyarai9226
@riyarai9226 4 ай бұрын
Thank you so much sir, this explanation was super helpful.
@subee128
@subee128 9 ай бұрын
Thanks
@nikoo28
@nikoo28 9 ай бұрын
Welcome
Mom had to stand up for the whole family!❤️😍😁
00:39
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 105 МЛН
DP 36. Buy and Sell Stock - II | Recursion to Space Optimisation
35:34
take U forward
Рет қаралды 240 М.
DP 35. Best Time to Buy and Sell Stock | DP on Stocks 🔥
9:11
take U forward
Рет қаралды 393 М.
Best Time to Buy and Sell Stock III | Leetcode #123
35:40
Techdose
Рет қаралды 70 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 484 М.
DP 37. Buy and Sell Stocks III | Recursion to Space Optimisation
31:50
take U forward
Рет қаралды 172 М.