I need your support, and you can do that by giving me a like, and commenting "understood" if I was able to explain you. Keeping a like target of 500 ❤️✌🏼
Believe me sir these lectures are sooo valuable that in upcoming days your like target will be crossing 100 times of what you expected...thank you so much ❤
I couldn't believe that I have solved this question without watching this tutorial, It's all about striver's magic 🔥🔥 You have explained the lecture 8 so well that I've solved 9,10,11,12 by myself. Thank you sir ♥
Same here. I was so afraid of this topic but I could solve the problems even before watching the videos. I then watched the full video to understand the topic better and also for the space complexity and space optimization in the end
I solved this problem all by myself, forming a recurrence relation and solving using recursion, updating it to memorization, and then converting the solution to tabulation and its space optimization. All of this without even starting the video, just by looking at the title and trying the problem by myself. Really grateful for your playlist, it follows a build-on-top approach, you take it from basics to advance, slowly increasing the complexity so the student doesn't get overwhelmed. Thank you
understood Sir .From DP Video 1 I was watching video in that mean time You suggested that At first complete at least lecture no 6 & 7 of recursion series .I paused then watched entire 19 videos of recursion series ,and then started watching this playlist And today in lecture no 12,I am able to build the logics slowly about the problem. Thanks Sir. I truly believe that whoever watching this lectures from beginning from the end of the series everyone can build logics on Dynamic Programming.
Finally after 12 videos I'm feeling lot more comfortable with DP still not able to come with solutions on my own but i don't have to watch more than once to understand concepts. Infact i was able to do memorization and tabulation on my own. Hope i can build recursion logic too by myself after watching few more videos.
I usually try to solve the problem mentioned in the video myself first then check Striver's intuition and solution of it. While searching for the problem of DP10 I accidently opened this problem(DP12) in CodingNinja website and started solving it. To my surprise, I was able to solve it and could build all the solutions by just following your steps. Thank you Striver! for teaching this concept in such a brilliant way. I was always afraid of DP as I could not get the intuition correct, but now I have gained a lot of confidence in it. You are indeed a GEM.
It's unbelievable I solved this problem by myself after watching your previous videos. The quality of your teaching is top notch. Striver is really GOAT
solved the problem without even watching the tutorial and did recursion -> memoization -> tabulation -> space optimization all by myself🥺🥺 Thank you striver❤❤❤❤❤
Phle mai dp ko lekr bhut pareshan tha , Phir is DP ultimate Series ko dekhna shuru kiya, ab mai recursion se space optimisation tak phunch jata hoon. Thanks a ton @striver bhaiya 😎
Very happy that I solved this question in all the formats except the space optimization, by just reading the question and given test cases. I still watched the whole video afterwards because I love listening to his explanations. You're doing a great job brother.
15:00 *TimeComplexity:* for the BruteForce: isn't it like below? Assume for a moment we have a single, hardcoded starting point, somewhere in the last row. From that, we'll be picking 3 paths, until we reach zero, so it's: 3^N. But then, we do this for every M column, right? So: *TC is: O(M (3^N))* *SC: O(N)* we go max N stack frames deep
understood. You did it from last so I had curiosity to do it from top to down in recursion and i did it. Because of you and the way you teach I can think of different approaches. Thank you striver bhaiya❤.
Understood sir,NOW I AM ABLE TO WRITE RECURSION CODE AND RECURRENCE TREE BY MYSELF AND COVERSION TO MEMOIZATION AND TABULATION. THANKYOU FOR YOUR PREMIUM CONTENTS.
Sir, I was able to solve this question all by myself... This is the first question of the series which I was able to solve all by myself, without any reference/ hint anything .... still I cross checked my method with yours ... And I clearly understood. Thank you😊
I just watched this video randomly after coming across this question and now the concept seems so interesting to me, that I am going to watch every video on dp and recursion of yours! Keep up the good work sir!
Understood man! I did this question without watching this video. I was able to come up with the plain recursive, memoization and tabulation all 3 methods.
Striver is Competing with himself only to provide more and more better content.....as soon as recursion tree gets over ... i am able to write all 3 approaches by my own. Thank you Striver...this is what your videos have done to me and many of us.... keep growing...
I am very happy to share that I have solved this question where I wrote the recursion, memoization, tabulation and space optimization all by my own. Thankyou striver for your great explanation in the previous lectures.
Was able to code the memoization, tabulation AND the optimal solution on my own for this one after solving the triangle problem. All thanks to you Striver!
Understood very well bhaiya...what u r doing is way way higher than liking,and commenting... may the good god bless u always, and u also get the same help from your senior ones as we are getting from you...thanks a lot. And ya, as u had in the first video of this series that,a t the end u'd feel that this is at a different level from other ,u indeed proved it as well.
@@nashidnoormohammed4027 as Java is pass by reference so if we do prev = curr , prev will start pointing to curr , i.e. both curr and prev are now point to the same array any changes made will be reflected in both the array simultaneously. And hence the prev will not contain information of the previous row For faster operations instead of array.clone we can use system.arrray.copy method to copy the elements of curr to prev
GUESS WHAT!!!! I solved it allll aloneeee!!!!!!!! Everything recursion, memoization, Tabulation and Space optimization!!!! STRIVER YOU ARE THE BESTTTTTTTTT!!!!!!!!!!!!!!!! BEST BEST BEST!!!!
For recursive solution : TC should be 3^(N*M) ... coz for every cell I am exploring 3 different path , total cell is N*M , correct me if I am wrong ,SC is also N*M
I think correct TC for recursion will be O( M * (3^N) ): 3^N for the paths (as Striver mentioned) and M because of the for loop in which recursion is called. It will not be 3^(M*N) because it is not like that there are three options for every cell in the matrix but is more like there are M paths (starting from any cell of last row) and each path takes 3^N as each element in that path have three options. As for space complexity it will be O(N) as at any time the height of recursive tree will be N (number of rows) and only when stack frames of this call are deleted, recursion starting from next cell of last row called.
Bhaiya 2-D dp ka first video dekha aapka and guess what,baki sare videos ke questions khud se hi solve ho rahe the....this is the strength of your qualilty content bhaiya.Keep it up,God bless you.
Very nicely explained...I was able to solve this on my own bcs I had watched earlier videos of this series. One point which I wanted to make that instead of traversing the for loop to find max, we can check for condition of i == n in our first inner loop only and store the max value of last row....it will reduce extra for loop just to find the max value in last row...
It will be too easy for you if you follow the playlist from the starting. Try to listen him carefully notice him what he actually doing to solve the problem. Thank you sir for this amazing playlist
This question came in IVP coderush this year (2023). It was about a random number generating machine which has layers and each layer has multiple nodes which can have three states 0, 1 and 2 which increase, keep same or decrease the number passed and you have to output the maximum value which can be obtained after going through all layers. And from each node you can only go to - the node directly below, bottom left and bottom right. I mean this question is happening.
thank u so much raj sir. today i solved the entire problem before watching the explanation. first recursion -> recursion +memoization -> tabulation -> tabulation with space optimization. thank u sir this entire process is wonderful to break a hard problem❣❣❣ and UNDERSTOOD 😁😁😁
Wow before watching the Video the solution came to my mind. seeing the same solution being explained in the video is awsm. Thanks for great explanation.
I need your support, and you can do that by giving me a like, and commenting "understood" if I was able to explain you.
Keeping a like target of 500 ❤️✌🏼
Crosssed 1k 🙌
5 lakh
@@anonymousvoid6356 😂
Believe me sir these lectures are sooo valuable that in upcoming days your like target will be crossing 100 times of what you expected...thank you so much ❤
Understood and awesome these type of videos must deserve more than million likes Just awesome.
I couldn't believe that I have solved this question without watching this tutorial, It's all about striver's magic 🔥🔥 You have explained the lecture 8 so well that I've solved 9,10,11,12 by myself. Thank you sir ♥
same here magic he bhai striver me
Same here. I was so afraid of this topic but I could solve the problems even before watching the videos. I then watched the full video to understand the topic better and also for the space complexity and space optimization in the end
bro in case of minimum falling path sum we have to use 1e9 and maximum falling path sum we should use -1e9 why
@@mashapoguajay3322 We are using 1e9 big value to avoid the case. it will add a big value so that while choosing minimum it will avoid the max value.
samee
I solved this problem all by myself, forming a recurrence relation and solving using recursion, updating it to memorization, and then converting the solution to tabulation and its space optimization. All of this without even starting the video, just by looking at the title and trying the problem by myself.
Really grateful for your playlist, it follows a build-on-top approach, you take it from basics to advance, slowly increasing the complexity so the student doesn't get overwhelmed.
Thank you
hi
@@shubh625 yes?
@@shubhamsth9 which college/company?
Important : this question was asked in online round of dream11
ye question mei kr leta hui , app dream 11 par team banao 😂
@@udaypratapsingh8923 🤣
@@udaypratapsingh8923 🤣🤣
is it offcampus or oncampus?
Per dream 11 me to ham satta lgate hai na ❤
understood Sir .From DP Video 1 I was watching video in that mean time You suggested that At first complete at least lecture no 6 & 7 of recursion series .I paused then watched entire 19 videos of recursion series ,and then started watching this playlist And today in lecture no 12,I am able to build the logics slowly about the problem. Thanks Sir. I truly believe that whoever watching this lectures from beginning from the end of the series everyone can build logics on Dynamic Programming.
True..!!
Absolutely true
100000 percent trueeeeeeeee
200% yes, one can start with zero knowledge on dp and get to a certain level on dp
you are right!
Finally after 12 videos I'm feeling lot more comfortable with DP still not able to come with solutions on my own but i don't have to watch more than once to understand concepts. Infact i was able to do memorization and tabulation on my own. Hope i can build recursion logic too by myself after watching few more videos.
I usually try to solve the problem mentioned in the video myself first then check Striver's intuition and solution of it. While searching for the problem of DP10 I accidently opened this problem(DP12) in CodingNinja website and started solving it. To my surprise, I was able to solve it and could build all the solutions by just following your steps. Thank you Striver! for teaching this concept in such a brilliant way. I was always afraid of DP as I could not get the intuition correct, but now I have gained a lot of confidence in it. You are indeed a GEM.
I can't believe that I solved this by myself, Recursion -> Memoization ->Tabulation -> space optimization.
You are a great teacher.
best teacher for Dp till now❤
Completely agree with you!
It's unbelievable I solved this problem by myself after watching your previous videos. The quality of your teaching is top notch. Striver is really GOAT
Solved all of the approaches including self optimisation myself. You are amazing! Thankyou
solved the problem without even watching the tutorial and did recursion -> memoization -> tabulation -> space optimization all by myself🥺🥺 Thank you striver❤❤❤❤❤
You Know what, I am binging this DP series like I did with the Peaky Blinders, Game of Thrones, Suits, Friends naming a few.. Amazing Job Striver..
Understood You make the problem as easy as it was not. Thanks for giving us such wonderful video lectures.
Phle mai dp ko lekr bhut pareshan tha ,
Phir is DP ultimate Series ko dekhna shuru kiya,
ab mai recursion se space optimisation tak phunch jata hoon.
Thanks a ton @striver bhaiya 😎
Very happy that I solved this question in all the formats except the space optimization, by just reading the question and given test cases.
I still watched the whole video afterwards because I love listening to his explanations. You're doing a great job brother.
wow I cant believe it I solved this question on my own before starting the video . thanks a lot striver
same here
I am following this dp series since the beginning and I was able to solve this question without your tutorial.
Thanks a lot striver!!
15:00 *TimeComplexity:* for the BruteForce: isn't it like below?
Assume for a moment we have a single, hardcoded starting point, somewhere in the last row.
From that, we'll be picking 3 paths, until we reach zero, so it's: 3^N.
But then, we do this for every M column, right? So:
*TC is: O(M (3^N))*
*SC: O(N)* we go max N stack frames deep
exactly I was thinking the same
isn't it should be O( 3 ^ (n*m) ), because in previous videos we are exploring only one point and still the TC is O( 2 ^ (n*m) )??
I just watched 2 lectures on 2d dp .. now i solved 2 problems withought seeing the solution . thank you striver
understood. You did it from last so I had curiosity to do it from top to down in recursion and i did it. Because of you and the way you teach I can think of different approaches. Thank you striver bhaiya❤.
Understood sir,NOW I AM ABLE TO WRITE RECURSION CODE AND RECURRENCE TREE BY MYSELF AND COVERSION TO MEMOIZATION AND TABULATION.
THANKYOU FOR YOUR PREMIUM CONTENTS.
Sir, I was able to solve this question all by myself... This is the first question of the series which I was able to solve all by myself, without any reference/ hint anything .... still I cross checked my method with yours ... And I clearly understood. Thank you😊
"us" what a teaching skill bhaiya .
easy path to learn DSA.❣❣❤
I was able to code the memoization, tabulation and space optimization by myself!
Thank you bhaiya 😄
I just watched this video randomly after coming across this question and now the concept seems so interesting to me, that I am going to watch every video on dp and recursion of yours! Keep up the good work sir!
Thank you so so so much! This series has made my life easy ❤
Understood man! I did this question without watching this video. I was able to come up with the plain recursive, memoization and tabulation all 3 methods.
Dp feels like a child's play, when learning from u. Thanks a lot Striver Bhai♥
really?
Recursion was my weakest topic and you build my logic soo well that I made the algorithm before you.
Thank You!
The best dp series I have ever watched 😍!!! "Understood" sir.
you are one of the best youtuber at this, i understood everything in your video ❤❤
Thanks Striver for making my life so easy
Striver is Competing with himself only to provide more and more better content.....as soon as recursion tree gets over ... i am able to write all 3 approaches by my own. Thank you Striver...this is what your videos have done to me and many of us.... keep growing...
Incredible... Amazing... great... best ever dp explanation UNDERSTOOD UNDERSTOOD UNDERSTOOD
Amazing dp playlist. I was able to solve this question on my own for all the 4 approaches. Feeling really very confident.
*Time complexity*
Recursion: 15:45
Memoization: 24:22
YOUR DP SERIES FEELS AMAZING NEVER FELT DP SO EASY CAN SEE PATTERNS EASILY NOW THANK YOU FOR TEACHING ❤❤❤❤❤❤🙏🙏🙏🙏
DP now seems like childs play striver!! Hats off for this wonderful explanation!!❤
I am very happy to share that I have solved this question where I wrote the recursion, memoization, tabulation and space optimization all by my own. Thankyou striver for your great explanation in the previous lectures.
Recurssion Solved by myself and dp
Understood.❤️
I think we will get 102 instead of 200 in rd (21:00)
he has corrected it at 21:35
yes
Was able to code the memoization, tabulation AND the optimal solution on my own for this one after solving the triangle problem. All thanks to you Striver!
kids: binge watch Netflix web-series
legend: binge watch striver's dp-series 🔥🔥🔥🔥
binge watch se ni hoga fayda bhai, solve kr lena khud se bhi
@@mayanksingh7501 😂
Understood very well bhaiya...what u r doing is way way higher than liking,and commenting... may the good god bless u always, and u also get the same help from your senior ones as we are getting from you...thanks a lot. And ya, as u had in the first video of this series that,a t the end u'd feel that this is at a different level from other ,u indeed proved it as well.
👌🏻👌🏻👌🏻👌🏻 understood crystal clear 👌🏻
understood all the four approaches
i like ur way how u teach us logic building!
For JAVA users do -
prev = curr.clone()
instead of prev = curr
:)
why wont prev=curr work?
@@nashidnoormohammed4027 as Java is pass by reference so if we do prev = curr , prev will start pointing to curr , i.e. both curr and prev are now point to the same array any changes made will be reflected in both the array simultaneously. And hence the prev will not contain information of the previous row
For faster operations instead of array.clone we can use system.arrray.copy method to copy the elements of curr to prev
GUESS WHAT!!!! I solved it allll aloneeee!!!!!!!!
Everything recursion, memoization, Tabulation and Space optimization!!!! STRIVER YOU ARE THE BESTTTTTTTTT!!!!!!!!!!!!!!!!
BEST BEST BEST!!!!
For recursive solution : TC should be 3^(N*M) ... coz for every cell I am exploring 3 different path , total cell is N*M , correct me if I am wrong ,SC is also N*M
I think correct TC for recursion will be O( M * (3^N) ): 3^N for the paths (as Striver mentioned) and M because of the for loop in which recursion is called. It will not be 3^(M*N) because it is not like that there are three options for every cell in the matrix but is more like there are M paths (starting from any cell of last row) and each path takes 3^N as each element in that path have three options.
As for space complexity it will be O(N) as at any time the height of recursive tree will be N (number of rows) and only when stack frames of this call are deleted, recursion starting from next cell of last row called.
@@chetanraghavvYou are absolutely correct 💯
its because of striver only i able to solve this by myself as you explained well in lec-8 Thank you Striver
coded down rec + memo + tabu + spac.opti. all my self. thanks bro, u r a gem
good question , was able to solve on my own after few trials and errors
I solved this question on my own. I can't tell anybody how confident I am feeling. Thanks striver.
Bhaiya 2-D dp ka first video dekha aapka and guess what,baki sare videos ke questions khud se hi solve ho rahe the....this is the strength of your qualilty content bhaiya.Keep it up,God bless you.
Very nicely explained...I was able to solve this on my own bcs I had watched earlier videos of this series. One point which I wanted to make that instead of traversing the for loop to find max, we can check for condition of i == n in our first inner loop only and store the max value of last row....it will reduce extra for loop just to find the max value in last row...
It will be too easy for you if you follow the playlist from the starting.
Try to listen him carefully notice him what he actually doing to solve the problem.
Thank you sir for this amazing playlist
I was never able to learn dp and here following this series, I am able to solve most of the ques myself.
this is the best ever dp playlist on internet , i think.
Understood! Thanks Striver for making DP easy :)
UNDERSTOOD
THANK u so so much for this amazing series thanks a lottttt
I couldn't believe that I solved the problem before seeing your vedio. Understood Raj Vikramadithtan Sir aka "Striver😉"
one of the best dp series on youtube
Really Really wonderful series. Understood everything.
This question came in IVP coderush this year (2023). It was about a random number generating machine which has layers and each layer has multiple nodes which can have three states 0, 1 and 2 which increase, keep same or decrease the number passed and you have to output the maximum value which can be obtained after going through all layers. And from each node you can only go to - the node directly below, bottom left and bottom right. I mean this question is happening.
completely understood. Best videos I have ever experienced. Thanks Man , Keep it Up!
I solved this whole ques by myself. Thankyouuu so much Striver😍
understood it very well...
Thanks for this amazing series
understood Striver.
coming to this lecture I feel the confidence in solving DP.
Thank You for this amazing teaching.
Understood!!, And thanks for the DP Series, For the last 3 Videos I am able to solve all steps by myself because of how you have explained it!!
i did it myself in just few minutes. very happy. reminder for future me
Thank You Bhaiyya!! This is the second question that I was able to solve on my own from Recursion to the Space Optimised version !!😇😇
Love your DP series! It helps me demystify DP. Thank you for sharing
Thank u so much for all of this videos, u r awesome.
thank u so much raj sir.
today i solved the entire problem before watching the explanation.
first recursion -> recursion +memoization -> tabulation -> tabulation with space optimization.
thank u sir this entire process is wonderful to break a hard problem❣❣❣
and UNDERSTOOD 😁😁😁
Sir you are the bestestest, Understood by heart
Solved it without watching the tutorial. Thanks Striver
Hey striver , love this series , this series makes DP clear to me . "Understood" ❤
Understood 💯💯 Great Explanation. Thank you very much for all you efforts🔥🔥
god level teaching,understood. if only every teacher were like you!!
This guys is making videos for us even on the republic day .....really hats off to you striver bhaiyyya
Awesome solution,explanation.
Understood bhaiya, I solved this by myself all 4 ways. Bahut bahut dhanyavad bhaiya
Just watched first 3 -4 minutes and solved on myself thanks
Coded tabulation right away within 10 minutes of reading the question... Thankyou striver!!
understood : ) thanks for this amazing series
Understood man .
Really great explanation.
Thanx for this effort.
thank you striver.. did all the problems from lec 8 by myself.. even space optimization....
Real Quality content here. Thank you Striver. "Understood". ♥
Miracle !! lappu sa sachin did this question by own ...seedha space optimized way me :)
understood Sir .From DP Video 1 I was watching video in that mean time
Thanks for sharing this knowledge with us.
You can store the values in-place and have SC=O(1) for dp (no need of space optimization if the array/matrix isn't read-only)
Understood,able to solve the problem by myself.Thank you striver for such wonderful playlist
"UNDERSTOOD BHAIYA!!"
Wow before watching the Video the solution came to my mind. seeing the same solution being explained in the video is awsm. Thanks for great explanation.
Tc with memoisation will be n^3 because we are calling recursion inside a for loop for every j .
I solved everything by myself!!thanks a ton.
yes it gives TLE by doing it through memoization. tabulation has to be used
' Thanks a lot striven for your support