This is actually a very good explanation. I was able to understand because of the dry-run of the code. Thanks a lot.
@meghan68199 ай бұрын
Your solutions and explanations are great!! thank you
@arupgope26766 ай бұрын
your explanation is great. I have tried many dsa channels to follow. Then I find this channel. It is so great and underrated.
@chandankumar-ip5hfАй бұрын
directly went into my head, able to write code after dry run explanation
@yomamasofat4133 ай бұрын
man every question like this just feels so exhausting. It's either some kind of trick or hack to solve the problem.
@usmanrangrez-cd7zj Жыл бұрын
class Solution { public: bool canJump(vector& nums) { int n=nums.size(); int maxJump=0; for(int i=0;imaxJump) return false; maxJump = max(maxJump,i+nums[i]); if(i>=n-1) return true; } return false; } };
@srikanthchebrolu1091 Жыл бұрын
I'm fan of ur way of teaching I learnt trees because of u Hope you start dp playlist like trees please ♥️😇
@arslanmuhammad4190 Жыл бұрын
He is great.
@nikoo28 Жыл бұрын
So nice of you
@suyashrahatekar4964 Жыл бұрын
underrated channel
@nexonsensei37938 ай бұрын
I watched so many videos n i could not understand the problem , after watching your video i finally understood it🥺🔥 the visualisation helped alot to understand
@nandinideshpande14674 ай бұрын
your explanation was very simple. made me understand the problem.
@nagendravelpuri444 Жыл бұрын
For this problem i seen many videos, but this one was crystal clear and i never forget. Very Good Job Sir.
@nikoo28 Жыл бұрын
So nice of you
@shwetakumari-ms2xg Жыл бұрын
watching your video for the first time, really liked your explanation. Would watch more of your videos :) thanks!
@nikoo28 Жыл бұрын
Glad you like them!
@ABDULKALAM-ig2dd Жыл бұрын
Sir I am big fan of your leetcode playlist, Regularly folllowing it ,Please continue doing more videos on leetcode ,Waiting for more Leetcode problems ❤
@nikoo28 Жыл бұрын
i am adding more and more problems when I get time. Trying to cover important problems first :)
@ABDULKALAM-ig2dd Жыл бұрын
@@nikoo28 🤍
@sravansunkara2 ай бұрын
Excellent solution
@surenderreddy62945 ай бұрын
fantastic brilliant,explanation sir,you deserve a lot
@Iam_Srikanth_0093 ай бұрын
It was really a clean and clear explanation ❤
@akashvijayasarathy62348 ай бұрын
this is a gem of a video.
@sagniksaha4179Ай бұрын
Explanation is awesome 💯. But i was thinking is it possible to think this soln in an interview. The very first thing came to my mind was recursion. I found this while i was going through the discussion section of leetcode. Any advices on how to think this type of soln in an interview. Any suggestion is appreciated
@ankitchaurasiya5296 ай бұрын
Just Wow... I understand after watching first time this video.
@bipinsingh1490 Жыл бұрын
Bhai quality explaintaion h apka great baki KZbin channel toh bs code padh dete h intuition toh batate v nhi h
@nikoo28 Жыл бұрын
i like to focus on the problem solving, rather than the language. Languages will come and go. 😅, logic will stay
@catsadogga16515 ай бұрын
your explanation is super
@arslanmuhammad4190 Жыл бұрын
Hi Sir, You are gem. I am learning from you a lot. Thanks, Sir for this Help.
@nikoo28 Жыл бұрын
It's my pleasure
@jamesk68849 ай бұрын
amazing explanation, love the video. this is my algorithm before watching ur video, it only passed 120/170 test cases when i tried to submit it. So i just wanted to know if my approach to this question is definitely incorrect. class Solution { public boolean canJump(int[] nums) { int size = nums.length-1; int sum = 0; for (int i=0; i < nums.length-1; i++){ sum += nums[i]; } if (sum-(nums.length-2)>= size){ return true; } else if (nums[0]>= nums.length-1){ return true; } else{ return false; } } } again, thx for the video
@tejas53318 ай бұрын
i like how you explain with Animation
@abhyudaysingh33813 ай бұрын
Best Explaination 👍
@shubhamkumar-hx1fb10 ай бұрын
i really hate kind of videos which doesnt tells the intuition why we are doing so.....there are many videos avl for this pblm and many of them are just doing the dry run of the code without telling the intuition behind their though process.... But i am really thanks to you sir that you focused more on the intuition behind the code and have not just done the dry run 😌😌
@nikoo289 ай бұрын
glad you liked it
@Ayushkumar-co9mc8 ай бұрын
Best explanation ever
@MadpolygonDEV Жыл бұрын
Incredible presentation as always. Would love to have you do a problem solving mindset tips and tricks.
@nikoo28 Жыл бұрын
that is a really great idea, I will add it to my pipeline of upcoming videos
@satyam_289 ай бұрын
Cool explanation bhai...and an advice...keep content concise and outro subtle
@nikoo289 ай бұрын
i try my best, but everyone has their own learning pace. for quick learners, i have chapter markers for faster navigation 😄
@tamilansgame73062 ай бұрын
perfect explantion
@amitshukla226811 ай бұрын
Please add your chair also in your Recording Gear? Did you buy it from amazon ?
@nikoo2811 ай бұрын
Links in the description :)
@amitshukla226811 ай бұрын
@@nikoo28 i didn't find it.
@nikoo289 ай бұрын
Chair is from Autonomous.
@raghavachekuri7270 Жыл бұрын
outstanding explination plz try to do playlist for DP ur explination is 🥳
@nikoo28 Жыл бұрын
I have a playlist on DP. Constantly adding more and more problems to it: kzbin.info/aero/PLFdAYMIVJQHPXtFM_9mpwwQtIdzP6kxHS
@tanishkaagarwal6750 Жыл бұрын
sir your explaination is awesome... keep uploading more videos.
@nikoo28 Жыл бұрын
thanks for your feedback, keep watching :)
@rambhaktuchihaobito79877 ай бұрын
thank u sir ... for such a great explanation❣❣
@kunalkheeva Жыл бұрын
Dry run really helped! thanks a tonne!
@nikoo28 Жыл бұрын
Great to hear!
@Mr.NothingSpecial8 ай бұрын
You're basically looking for the last reachable index at each iteration. That is not a greedy approach. Can you explain what do you mean by greedy approach?
@nikoo288 ай бұрын
My greed is that I want to reach the last pointer from where I am standing
@workHolic-ne6eo11 ай бұрын
thats the video i was searching exactly
@Paradox828278 ай бұрын
Very good explaination!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@filmbuzz9419 Жыл бұрын
Take a value and show it by dry run so we understand a bit more Thanks
@gauravjain969 Жыл бұрын
Awesome explanation 🔥
@gurudassulebhavikar11 ай бұрын
You could have used your Jump Game 2 solution here. Both problems are almost same.
@subhashreesahoo57606 ай бұрын
Hi.. Thanks for the vide, your explanation is really good and helpful. But I do have doubt here and a request while explaining , pls consider the code also . I feel like the explanation and the dry run code somewhere I am unable to understabnd(may be I need more practice but still..) Example-> while explaining you said to go back step from 1 , that is 0, you cant reach the destination => agree but in dry run code-> idx+nums[idx] , how are you bringing these terms, like how did you think its should be in this way , its like idx=7,nums[7]=0 and you are adding both 7+0=7, so i am not getting how your idea is to add idx+nums[idex].
@nikoo286 ай бұрын
If you have understood the explanation, try to write the code on your own. That is the only way you will learn. If everything else fails, only then refer to someone else’s code.
@subhashreesahoo57606 ай бұрын
@@nikoo28 ok sure, Thank you, I will take your advice and implement the same.
@Karan9.911 ай бұрын
very nice and clear explanation thanks !!!
@nikoo2810 ай бұрын
Glad it was helpful!
@arjitgautam3659 ай бұрын
really helpful. Thanks a lot!
@Krishnasagars222 ай бұрын
Great!! Thanks a lot
@КарэнАкопьян Жыл бұрын
Thank you for your work!
@nikoo2811 ай бұрын
My pleasure!
@jk-sm6qr7 ай бұрын
Nice explaination, Thank you
@nikoo287 ай бұрын
You are welcome
@MeghaVerma-n9kАй бұрын
Osm explanation thnks
@Shhhh-ni5jw7 ай бұрын
With this approach, we never stop on the 0’s right? We are checking if somehow we are able to bypass
@nikoo287 ай бұрын
Yes
@LetsGo-ro1iq7 ай бұрын
Great Video
@abhinavprasad282811 ай бұрын
Okay so, I don't usually comment but yeah this video was great.
@nikoo2811 ай бұрын
Thank you so much
@amitshukla226811 ай бұрын
Very nice explanation, thanks, keep it up :)
@hamdasalam43734 ай бұрын
could you please create a video for leetcode 2483?
@КарэнАкопьян Жыл бұрын
Thank you, you helped me so much!
@nikoo28 Жыл бұрын
You're very welcome!
@subee12810 ай бұрын
Thanks
@taslimarahmanprema864311 ай бұрын
Best one
@abhishekomprakash407411 ай бұрын
Super useful.💯
@mahadishakkhor1238 ай бұрын
i understand from u
@SibiRanganathL2 ай бұрын
Understood
@TraySoek Жыл бұрын
brilliant
@paridhishrivastava9133 Жыл бұрын
thankyou so much sir its too good
@saisree046 ай бұрын
Thanks a ton
@nguyenhoanthien42772 ай бұрын
great!
@murugesh19155 ай бұрын
Nice content
@AshishKumar-x5l8s8 ай бұрын
Its O(N**2) ?? Can anyone explain in case of DP
@nikoo288 ай бұрын
why do you want a solution with a poor time complexity?
@nehakanki16069 ай бұрын
Got itt👍
@razataggarwal736511 ай бұрын
Why we are calling optimal solution as greedy algorithm ? My perspective : If I see it, we have optimized our Iterative DP (Tabulation) by going to every index from last to first and asking if i can reach target or not.
@DigvijayKirti10 ай бұрын
What if the second last element is zero? Let's dry run the provided array [3, 2, 1, 0, 4] through the given canJump method: Dry run: Initial State: lastElement = 4 (index of the last element). Iteration 1 (i = 3): i + nums[i] = 3 + 0 >= 4, which is less than lastElement. No update. Iteration 2 (i = 2): i + nums[i] = 2 + 1 >= 4, which is less than lastElement. No update Iteration 3 (i = 1): i + nums[i] = 1 + 2 >= 4, which is less than lastElement. No update Iteration 4 (i = 0): i + nums[i] = 0 + 3 >= 4, which is less than lastElement. No update Return: lastElement == 0, which is true. So, for the array [3, 2, 1, 0, 4], the canJump method returns true, indicating that it is possible to jump from the first element to the last element. Please explain I'm not able to understand the false case?
@nikoo289 ай бұрын
you need to start from the last element, not the first one. watch the explanation that starts at 9:17
@pkeditsff840514 күн бұрын
I didn't understand your code 😢😢😢😢
@singhvishal87949 ай бұрын
i actually tried this code and come across a wrong ans for [1] as it is reachable at any cost so i run the loop from nums.length -1 to 0 and that worked.... and thank you for this amazing solution i stuck on this for 3 hrs straight...