I used chatgpt to generate solution but I cannot understand it. After watch this video, I understand every single line of the chatgpt code. You're the best
Nikhil , You don't know , How you inspired me in teaching the problem and making the things simple and crisp. I really love the way how you taught your final thoughts. Gained some inspiration as well as the solution. Keep rocking Nikhil 🔥.
bro you're a legend I can usually come up with memoization you're way of explaning made it easy for me to translate my understanding to tabulation. thanks a lot!
My First watch of this channel video !! Great explanation !! This I call as a social service which any one can avail in this country and will remember your explanation !! Subscribed !!
for dynamic programming, the more you practice, the more patterns you will start seeing. Most of the problems work on the same idea, the words are just twisted. One thing that often helps me is visualize where do I have to ultimately reach. Then start to build a backwards solution.
i have watched this vedio today,you asked us to decrease the space complexity of above algorithm.I have found that the operations can be done in same given arra i.e : int len = nums.length; if(len == 1) return nums[0]; nums[1] = Math.max(nums[0],nums[1]); for(int i = 2; i < len; i++) { nums[i] = Math.max(nums[i - 2] + nums[i],nums[i - 1]); } return nums[len - 1]; By this way we optimise the space. Space complexity == O(1) Thank you for your Help........
I swear, you are awfully underrated man, as opposed to Neetcode who are so overrated. No offence to Neetcode. Everytime I don't understand an explanation from Neetcode (which is almost always the case from problem 10 onwards in Neetcode Blind 75), I always come to you and you never let me down.
everyone has their own style of teaching, and everyone understands differently. Whatever helps you!! 😄 Glad I am able to help you out. You can help by sharing and subscribing 😄
interesting, i've been solving dp problems which only use recursion, so I assumed that dp generally applied only to recursive solutions, its good to see it used in a different way, thanks!
Hey buddy, I have been coding fgr a while, I use your videos as my revision. You are great brother, can you bring a series of hard algorithm with dynamic programming solution
for sure, i am planning to bring in all the hard problems as well. just need some time to build up the basics. I will start on those hard problems by the end of the year.
func rob(nums []int) int { if len(nums) == 1 { return nums[0] } if len(nums) == 2 { return max(nums[0], nums[1]) } a := nums[0] b := max(nums[0], nums[1]) for i := 2; i < len(nums); i++ { a, b = b, max(a + nums[i], b) } return b }
i will add it to my queue and get a video out sometime...but to be honest..this is not a good problem to solve...doesn't actually test your logical or data structure skills.
Not to give you false hopes…but there is no source…the more you practice the more easily you will be able to identify patterns. Things will start to get a little comfortable day by day :)
Top-notch explanation available on UA-cam, thanks!
finally i can sleep peacefully now...what an explaination. just wow... Thanks man!!!
Great to hear!
I used chatgpt to generate solution but I cannot understand it. After watch this video, I understand every single line of the chatgpt code. You're the best
Nikhil , You don't know , How you inspired me in teaching the problem and making the things simple and crisp.
I really love the way how you taught your final thoughts.
Gained some inspiration as well as the solution.
Keep rocking Nikhil 🔥.
omg my brain is physically hurting from this...
bro you're a legend I can usually come up with memoization you're way of explaning made it easy for me to translate my understanding to tabulation. thanks a lot!
The way you explain is just awesome..please don’t stop.. after going through your videos I’m in love with DP ..thanku so much.
That is so amazing to hear 🤩
@@nikoo28 really awesome )
dayum...... awesome explanation brother. bows down. live long Nikhil.
Bro your explanation is just awesome!! u explained each step in detail
i first went through the entire playlist of DSA by kunal and now Im here to learn the remaining topics. You honestly teach so well!
Best explanation on you tube, thank you
Really grateful for your thorough explanations, Nikhil. They help clarify each problem and its solution very clearly.
Amazing explanation. I was looking everywhere why this works and you manage to explain it in a way that clicked
Leetcode is art and you're Picasso. Incredible explanation Nikhil!
Fantastic explanation! I watched a few other videos and didn't understand, but with yours the logic finally clicked...
Crystal clear explanation! Great job!!!
Very well explained. U have knack of teaching
Thank you so much! First time seeing someone explaining solution as good as NeetCode1
My First watch of this channel video !! Great explanation !! This I call as a social service which any one can avail in this country and will remember your explanation !! Subscribed !!
thanks for the sub!!
max waali condition jo aapne btai woh hum pehli baar mein kaise sochein khud se ,for future problems jo developer solve krega
for dynamic programming, the more you practice, the more patterns you will start seeing. Most of the problems work on the same idea, the words are just twisted.
One thing that often helps me is visualize where do I have to ultimately reach. Then start to build a backwards solution.
Excellent.. The best explanation on utube !
Much better explanation than neetcode's one. Thank you!
Yes, but his code is more optimal in space complexity
your explanations are amazing,, I understood it quickly
Bro..U r tooo good.. The way u explained is awesome, super. Please keep it up...
This is the best I've seen anyone explain the problem. Thank you so much yaar.
always happy to have you as my audience :)
Top notch❤ love you sir keep upload leet code p
i have watched this vedio today,you asked us to decrease the space complexity of above algorithm.I have found that the operations can be done in same given arra i.e : int len = nums.length;
if(len == 1)
return nums[0];
nums[1] = Math.max(nums[0],nums[1]);
for(int i = 2; i < len; i++)
{
nums[i] = Math.max(nums[i - 2] + nums[i],nums[i - 1]);
}
return nums[len - 1];
By this way we optimise the space.
Space complexity == O(1)
Thank you for your Help........
Your contents are great, highly appreciated , Please keep uploading more interesting problems.. Thanks
More to come!
Subscribed , Nice Explaination
Very clean explanation, Thank you
Great logic and great explanation! Expecting more videos.
No words. Simply wow!!!
your comment - "just looking like a wow"..thanks for the support.
The best explanation that i have ever found! thank u so much
thank you for breaking this down! :)
Very to understand explanation, Loved it.
I swear, you are awfully underrated man, as opposed to Neetcode who are so overrated. No offence to Neetcode.
Everytime I don't understand an explanation from Neetcode (which is almost always the case from problem 10 onwards in Neetcode Blind 75), I always come to you and you never let me down.
everyone has their own style of teaching, and everyone understands differently. Whatever helps you!! 😄
Glad I am able to help you out. You can help by sharing and subscribing 😄
wow just a amazing , explaination great work
Brother thank you so much 🥺❤ now I understand after you drawing those pictures
interesting, i've been solving dp problems which only use recursion, so I assumed that dp generally applied only to recursive solutions, its good to see it used in a different way, thanks!
Every recursive problem has an iterative solution..and I usually prefer those..recursive code is super hard to read
Excellent explanation, thank you
masterpiece
one that stood out 🔥🔥
Excelente explicação!
Muito obrigado!
u earned my respect
Clearly explained, thankyou.
Great explanation thank you.
ek no bhai
Thankyou sir!!
Great Explaination, beginners friendly.
Great video boss!
Thank you very much for the well-explained video 👍
Amazing explanation !!
Incredible stuff !
Great explanation, Thank you for sharing your knowledge.
My pleasure!
can you explain 139)word break problem in leetcode
Thank you!!
Hey buddy, I have been coding fgr a while, I use your videos as my revision. You are great brother, can you bring a series of hard algorithm with dynamic programming solution
for sure, i am planning to bring in all the hard problems as well. just need some time to build up the basics. I will start on those hard problems by the end of the year.
8+4 should be 12 instead of 11??
The best on UA-cam!
So heartwarming to hear that :)
best explanation
sir the way u teach...... is so good ❣❣
Thank you so much 😀
😎 cool
bro according to base case you provided what if arraylength ==0 and you are trying to access arr[0], is that not con concerning ??
thank you 🎉
Excellent explanation 🤩
it really helped bro!
legend bro legend
I think the way you explain is tabulation not memoization btw very excellent explanation .
tabulation is a way of memoization.
Thanks
Nice Explanation,
how to return the houses he robbed?
func rob(nums []int) int {
if len(nums) == 1 {
return nums[0]
}
if len(nums) == 2 {
return max(nums[0], nums[1])
}
a := nums[0]
b := max(nums[0], nums[1])
for i := 2; i < len(nums); i++ {
a, b = b, max(a + nums[i], b)
}
return b
}
Amazing video
Please provide the solution to the paint fence problem
i don't have access to the problem. Can you provide me an alternate link
спасибо, очень классно всё объясняешь. Я смотрел тебя с автоматическим кривым переводом через нейросеть и всё равно всё понял)
Я так рада, что смогла вам помочь.
Please make a video about Git
that is a good suggestion. I will start preparing something on it. :)
Hello Bhaiya, Can you please make a video on Check If It Is a Good Array leetcode (1250).
i will add it to my queue and get a video out sometime...but to be honest..this is not a good problem to solve...doesn't actually test your logical or data structure skills.
2 baar stiver deka nahi aaya saimaj eak barr lohia deka all test case pass
how can i find the houses that i robbed??
start with the total loot at each index. with respect to the house you choose, store those results
Sir any source to learn dynamic programming?
Not to give you false hopes…but there is no source…the more you practice the more easily you will be able to identify patterns. Things will start to get a little comfortable day by day :)
fail test case 1,2,3,1
1,2,3,1 does give the answer as 4, which is correct. What answer do you expect ?
Bro what about input as [2,1,1,2]
The output should be 4. First house and the last house.
The above method will output as 4. My solution is based on the method and it gives a correct answer. Can you explain your thought process?
@@nikoo28 Ok bro