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.
This is the kind of teaching that truly makes a difference. The way you broke down the problem step by step and logically arrived at the solution is commendable. You didn’t just solve the problem; you taught us how to think critically and approach challenges methodically. Thank you for such insightful teaching!
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.
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.
The code given in the video is failed on the Testcase : [1,2] So I modified the profit updation part a little please do check once. class Solution { public int maxProfit(int[] prices) { int buy_price = prices[0]; int profit = 0 ; for(int i=1 ; i < prices.length ; i++){ if(prices[i] < buy_price){ buy_price = prices[i]; } else if (prices[i] - buy_price > profit){ profit = prices[i] - buy_price ; } } return profit ; } }
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 ??
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?
@@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.
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.
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.
Why are his lectures not having enough views? They are so good.
Thumbnail
They love only clickbait and trends. He is treasure, hope he start DSA course, I will buy at any cost.
@@GeetainSaar obviously this is the main reason but once you watch you'll search NIKIL lohia
Your clear explanation is so good. Clearly this video deserves more views, bless you!
thanks for your appreciation and motivation :)
This is the kind of teaching that truly makes a difference. The way you broke down the problem step by step and logically arrived at the solution is commendable. You didn’t just solve the problem; you taught us how to think critically and approach challenges methodically. Thank you for such insightful teaching!
one of the best yet simple solution i have seen so far.
So happen I randomly found you. Thank you for the content. You are definitely helping me understand the coding mindset.
This explanation deserves more views and sharing with friends and colleagues. Simply brilliant
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.
This shows how really actually conscious working hard people are very few , and it proves by the video views
Mind Blowing Explaination , Very Clear and Consice
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.
better than more phd holder, great explanation
Litreally the best tutor i have ever got! Thank you so damn much bro!
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
It's my pleasure
such a clean explanation with visuals, thank you!
so happy you like them
You are a gem!
Thanks I am learning from you, your explanation is very comfortable to me.
Thanks for explaining this approach in simple words
I'm happy it was easy to understand.
really appreciate your effort to explain and how to reach to solution step by steps. It is great help. keep it up!! thanks lot
you are very welcome!!
Really Good content... Best video lecture on UA-cam. Keep doing good work
You should be a tutor or teacher,
thanks for uploading :D
😍superb explaination, tq bro 😊 tq so much😊😊😊
As usual I respect my teachers most but.
Uh got the respect from it's peak.📈❤
great explanation with clear and concise way.
You explained so well😊
Brother your explanation is love
best explanation that i found
Thank you so much sir, this explanation was super helpful.
very underrated channel
You are toooo good! Thanks a lot sir
Very clear explaination
Thank you so much
Thank you so much, this explanation was super helpful.
Excellent explaination🥰❤😊 bro
It's more better explanation than neetcode) thx
the best explanation❤❤❤❤
Thanks man. Good coding.
Underated teacher
Great explanation ❤
Best explanation..thanks!
great explanation....thank you sir
Thank you for your great explanation..it will be great if you solve hackerank array manipulation problem
You are awesome!
great understanding
great video and very well explained 😃
Bhaiya tussi GREAT ho!!!🎉
you are great too :D
very nice explanation.
nice explanation ...keep it bro🤩
Thank you, I will
Was able to code on my own
Thanks, it was really helpfull...
great explanation👍
excellent!!
thank you very much sir nicely explained
Thanks for the video
The code given in the video is failed on the Testcase : [1,2]
So I modified the profit updation part a little please do check once.
class Solution {
public int maxProfit(int[] prices) {
int buy_price = prices[0];
int profit = 0 ;
for(int i=1 ; i < prices.length ; i++){
if(prices[i] < buy_price){
buy_price = prices[i];
}
else if (prices[i] - buy_price > profit){
profit = prices[i] - buy_price ;
}
}
return profit ;
}
}
brother i think even if we remove the else block and write update the currentProfit directly it should still work
Pls do cover all the parts of buy and sell problem if possible
yep...I do have that on my mind 😄
i love your english
well explained
Thankyou sir.
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 ??
try debugging and you will be able to follow along the step you are missing
How to find and return the indices of best day to buy and best day to sell with max profit?
that is another problem...and will cover it at a later point in time
Thanks
Welcome
U are looking like that guy who host the show "the mad" in pogo❤
haha...you mean rob?
what is the name of this algorithm?
Kadane's algorithm
Sir please write code also at the last by yourself
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?
@@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.
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.
@@nikoo28 okk bhaiya i will give my best
❤
👍
It's more difficult to understand why your videos are getting low views than to understand the problem 😂
Thank you so much sir, this explanation was super helpful.
Thanks
thanks