Тёмный

DP 12. Minimum/Maximum Falling Path Sum | Variable Starting and Ending Points | DP on Grids 

take U forward
Подписаться 697 тыс.
Просмотров 232 тыс.
50% 1

Опубликовано:

 

23 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1,1 тыс.   
@takeUforward
@takeUforward 2 года назад
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 ❤️✌🏼
@willturner3440
@willturner3440 2 года назад
Crosssed 1k 🙌
@anonymousvoid6356
@anonymousvoid6356 2 года назад
5 lakh
@nikhilsaharan
@nikhilsaharan 2 года назад
@@anonymousvoid6356 😂
@LBK3
@LBK3 Год назад
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 ❤
@sukhpreetsingh5200
@sukhpreetsingh5200 Год назад
Understood and awesome these type of videos must deserve more than million likes Just awesome.
@shubhamsth9
@shubhamsth9 2 года назад
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
@shubh625
@shubh625 3 месяца назад
hi
@shubhamsth9
@shubhamsth9 3 месяца назад
@@shubh625 yes?
@shubh625
@shubh625 3 месяца назад
@@shubhamsth9 which college/company?
@RupamSasmalYt
@RupamSasmalYt Год назад
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 ♥
@shaikasifali7141
@shaikasifali7141 Год назад
same here magic he bhai striver me
@santanu29
@santanu29 Год назад
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
@mashapoguajay3322
@mashapoguajay3322 Год назад
bro in case of minimum falling path sum we have to use 1e9 and maximum falling path sum we should use -1e9 why
@aditya__mishraa__
@aditya__mishraa__ Год назад
@@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.
@dhruv412
@dhruv412 6 месяцев назад
samee
@nammi895
@nammi895 2 года назад
Important : this question was asked in online round of dream11
@udaypratapsingh8923
@udaypratapsingh8923 2 года назад
ye question mei kr leta hui , app dream 11 par team banao 😂
@suchithreddy733
@suchithreddy733 2 года назад
@@udaypratapsingh8923 🤣
@mauriziogucci7125
@mauriziogucci7125 2 года назад
@@udaypratapsingh8923 🤣🤣
@venkateshnagumantri3130
@venkateshnagumantri3130 Год назад
is it offcampus or oncampus?
@VINAYSINGH-wc8sq
@VINAYSINGH-wc8sq Год назад
Per dream 11 me to ham satta lgate hai na ❤
@ankitadas5833
@ankitadas5833 2 года назад
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.
@pawanagrawal7653
@pawanagrawal7653 2 года назад
True..!!
@dennyage4791
@dennyage4791 2 года назад
Absolutely true
@successsavataar.ai786
@successsavataar.ai786 2 года назад
100000 percent trueeeeeeeee
@dheerajsaigogineni3967
@dheerajsaigogineni3967 2 года назад
200% yes, one can start with zero knowledge on dp and get to a certain level on dp
@venkateshnagumantri3130
@venkateshnagumantri3130 Год назад
you are right!
@tg62672
@tg62672 2 года назад
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.
@lavanya_m01
@lavanya_m01 7 месяцев назад
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
@nawazgaming6743
@nawazgaming6743 2 года назад
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.
@varunarora3453
@varunarora3453 2 года назад
best teacher for Dp till now❤
@PIYUSH61004
@PIYUSH61004 2 года назад
Completely agree with you!
@ahanavishwakarma3956
@ahanavishwakarma3956 2 года назад
Solved all of the approaches including self optimisation myself. You are amazing! Thankyou
@haetz9686
@haetz9686 2 года назад
Understood You make the problem as easy as it was not. Thanks for giving us such wonderful video lectures.
@nict8094
@nict8094 2 года назад
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
@unknownuser8912
@unknownuser8912 2 года назад
exactly I was thinking the same
@vatsalmanvar3383
@vatsalmanvar3383 2 года назад
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) )??
@vipulmaheshwari2321
@vipulmaheshwari2321 2 года назад
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..
@sameekshamurdia5-yeariddph649
solved the problem without even watching the tutorial and did recursion -> memoization -> tabulation -> space optimization all by myself🥺🥺 Thank you striver❤❤❤❤❤
@KalingaAbhisek
@KalingaAbhisek 2 года назад
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❤.
@anshumanpanigrahi7817
@anshumanpanigrahi7817 2 года назад
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.
@parthjangid5966
@parthjangid5966 2 года назад
Thank you so so so much! This series has made my life easy ❤
@navneetsinha8387
@navneetsinha8387 Месяц назад
I can't believe that I solved this by myself, Recursion -> Memoization ->Tabulation -> space optimization. You are a great teacher.
@harshadmehta5209
@harshadmehta5209 2 года назад
wow I cant believe it I solved this question on my own before starting the video . thanks a lot striver
@anjanisharma9509
@anjanisharma9509 2 года назад
same here
@atryshsharma773
@atryshsharma773 Год назад
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!
@darksidekiller5300
@darksidekiller5300 2 года назад
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😊
@phantienminh164
@phantienminh164 11 месяцев назад
you are one of the best youtuber at this, i understood everything in your video ❤❤
@garvitrajput8491
@garvitrajput8491 2 года назад
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 😎
@rohitkeshri9571
@rohitkeshri9571 7 месяцев назад
this is the best ever dp playlist on internet , i think.
@shwetakirave3726
@shwetakirave3726 2 года назад
Incredible... Amazing... great... best ever dp explanation UNDERSTOOD UNDERSTOOD UNDERSTOOD
@deveshyadav7830
@deveshyadav7830 2 года назад
Amazing dp playlist. I was able to solve this question on my own for all the 4 approaches. Feeling really very confident.
@parthsalat
@parthsalat 2 года назад
*Time complexity* Recursion: 15:45 Memoization: 24:22
@r_uhi05
@r_uhi05 2 месяца назад
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.
@nikitakubavat8142
@nikitakubavat8142 2 года назад
The best dp series I have ever watched 😍!!! "Understood" sir.
@kartiksuman9814
@kartiksuman9814 2 года назад
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.
@mohitnaik444
@mohitnaik444 2 года назад
Dp feels like a child's play, when learning from u. Thanks a lot Striver Bhai♥
@redbook6531
@redbook6531 Год назад
really?
@hyperkon9807
@hyperkon9807 2 года назад
Recursion was my weakest topic and you build my logic soo well that I made the algorithm before you. Thank You!
@sharmakartikeya
@sharmakartikeya 2 года назад
I was able to code the memoization, tabulation and space optimization by myself! Thank you bhaiya 😄
@SaurabhMishra-e8m
@SaurabhMishra-e8m Год назад
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...
@SecondYearStudent
@SecondYearStudent 2 года назад
Thanks Striver for making my life so easy
@oqant0424
@oqant0424 Год назад
understood all the four approaches i like ur way how u teach us logic building!
@daskool5420
@daskool5420 2 года назад
Recurssion Solved by myself and dp Understood.❤️
@ayushichoudhary1019
@ayushichoudhary1019 8 месяцев назад
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!
@viditkhandelwal3241
@viditkhandelwal3241 2 года назад
I think we will get 102 instead of 200 in rd (21:00)
@ganeshkamath89
@ganeshkamath89 2 года назад
he has corrected it at 21:35
@divyangdheer7292
@divyangdheer7292 2 года назад
yes
@KUMARSAURABH-s5i
@KUMARSAURABH-s5i 2 месяца назад
I am following this dp series since the beginning and I was able to solve this question without your tutorial. Thanks a lot striver!!
@saurabhkumarsingh9550
@saurabhkumarsingh9550 2 года назад
👌🏻👌🏻👌🏻👌🏻 understood crystal clear 👌🏻
@PIYUSH61004
@PIYUSH61004 2 года назад
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.
@pragneshamadavadi2267
@pragneshamadavadi2267 Год назад
kids: binge watch Netflix web-series legend: binge watch striver's dp-series 🔥🔥🔥🔥
@mayanksingh7501
@mayanksingh7501 5 месяцев назад
binge watch se ni hoga fayda bhai, solve kr lena khud se bhi
@asmisrivastava3934
@asmisrivastava3934 3 месяца назад
@@mayanksingh7501 😂
@stylishstarrick882
@stylishstarrick882 Год назад
YOUR DP SERIES FEELS AMAZING NEVER FELT DP SO EASY CAN SEE PATTERNS EASILY NOW THANK YOU FOR TEACHING ❤❤❤❤❤❤🙏🙏🙏🙏
@suchithreddy733
@suchithreddy733 2 года назад
DP now seems like childs play striver!! Hats off for this wonderful explanation!!❤
@abhijeetmishra3804
@abhijeetmishra3804 9 месяцев назад
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...
@amitranjan6998
@amitranjan6998 2 года назад
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
@chetanraghavv
@chetanraghavv 2 года назад
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.
@pqrstwxyz1175
@pqrstwxyz1175 Год назад
​@@chetanraghavvYou are absolutely correct 💯
@arnabdutta4662
@arnabdutta4662 2 года назад
For JAVA users do - prev = curr.clone() instead of prev = curr :)
@nashidnoormohammed4027
@nashidnoormohammed4027 2 года назад
why wont prev=curr work?
@arnabdutta4662
@arnabdutta4662 2 года назад
@@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
@AdityaRajVerma-io3pr
@AdityaRajVerma-io3pr 7 месяцев назад
coded down rec + memo + tabu + spac.opti. all my self. thanks bro, u r a gem
@logeshkumar1852
@logeshkumar1852 2 месяца назад
I just watched 2 lectures on 2d dp .. now i solved 2 problems withought seeing the solution . thank you striver
@rahul_siloniya
@rahul_siloniya Год назад
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.
@DivyanshukumarCs
@DivyanshukumarCs Год назад
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.
@tasneemayham974
@tasneemayham974 Год назад
GUESS WHAT!!!! I solved it allll aloneeee!!!!!!!! Everything recursion, memoization, Tabulation and Space optimization!!!! STRIVER YOU ARE THE BESTTTTTTTTT!!!!!!!!!!!!!!!! BEST BEST BEST!!!!
@dipaligangawane980
@dipaligangawane980 2 года назад
Really Really wonderful series. Understood everything.
@gurleensoni7124
@gurleensoni7124 2 года назад
one of the best dp series on youtube
@piyushsharma7795
@piyushsharma7795 Год назад
I solved this question on my own. I can't tell anybody how confident I am feeling. Thanks striver.
@aayushgakhar3525
@aayushgakhar3525 2 месяца назад
good question , was able to solve on my own after few trials and errors
@aakanksha795
@aakanksha795 2 года назад
Understood! Thanks Striver for making DP easy :)
@ArdentMusicLover
@ArdentMusicLover 7 месяцев назад
Love your DP series! It helps me demystify DP. Thank you for sharing
@ajayprajapati3029
@ajayprajapati3029 3 месяца назад
"us" what a teaching skill bhaiya . easy path to learn DSA.❣❣❤
@sangeetasharma8574
@sangeetasharma8574 Год назад
understood Striver. coming to this lecture I feel the confidence in solving DP. Thank You for this amazing teaching.
@vikasbagri1225
@vikasbagri1225 2 года назад
understood it very well... Thanks for this amazing series
@tgayush1424
@tgayush1424 3 месяца назад
Awesome solution,explanation.
@ShivanshuTripathi21BCE618
@ShivanshuTripathi21BCE618 Месяц назад
its because of striver only i able to solve this by myself as you explained well in lec-8 Thank you Striver
@arun1p7
@arun1p7 2 года назад
completely understood. Best videos I have ever experienced. Thanks Man , Keep it Up!
@Morimove
@Morimove 9 месяцев назад
i did it myself in just few minutes. very happy. reminder for future me
@mugambo5505
@mugambo5505 Год назад
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 😁😁😁
@abhishekkarn8918
@abhishekkarn8918 7 месяцев назад
Solved it without watching the tutorial. Thanks Striver
@studyonline3236
@studyonline3236 Год назад
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)
@introvert9112k
@introvert9112k Год назад
I think, the Time Complexity of the recursive approach should be O(n*3^m) n -- no of columns. m -- No of Rows. For each cell in the last row, the recursive tree can grow up to 3^m.
@dishagupta7446
@dishagupta7446 2 года назад
I was never able to learn dp and here following this series, I am able to solve most of the ques myself.
@tanyagupta4247
@tanyagupta4247 2 года назад
I solved this whole ques by myself. Thankyouuu so much Striver😍
@suhaanbhandary4009
@suhaanbhandary4009 2 года назад
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!!
@RCB895
@RCB895 7 месяцев назад
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
@anshumaan1024
@anshumaan1024 Год назад
At 8:56, f(i,j) will return maximum path sum to reach any first row from (i,j) correct me if i'm wrong
@prabhakaran5542
@prabhakaran5542 8 месяцев назад
Understood ❤
@yashlakade179
@yashlakade179 2 года назад
Thank You Bhaiyya!! This is the second question that I was able to solve on my own from Recursion to the Space Optimised version !!😇😇
@dps3902
@dps3902 Год назад
god level teaching,understood. if only every teacher were like you!!
@soniyarizvi1200
@soniyarizvi1200 Год назад
Hey striver , love this series , this series makes DP clear to me . "Understood" ❤
@sanchitkadwe90
@sanchitkadwe90 2 года назад
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.
@dharmeshpoladiya9047
@dharmeshpoladiya9047 2 года назад
Understood 💯💯 Great Explanation. Thank you very much for all you efforts🔥🔥
@sandeepparimi5316
@sandeepparimi5316 2 года назад
Thanks for sharing this knowledge with us.
@Wuaners
@Wuaners Месяц назад
Thank u so much for all of this videos, u r awesome.
@shaddyrogue9430
@shaddyrogue9430 2 года назад
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.
@saseerak8763
@saseerak8763 2 года назад
I solved everything by myself!!thanks a ton.
@chirag7694
@chirag7694 2 года назад
Understood bhaiya, I solved this by myself all 4 ways. Bahut bahut dhanyavad bhaiya
@bhagatalisha
@bhagatalisha Месяц назад
Sir you are the bestestest, Understood by heart
@AJ-zo4pr
@AJ-zo4pr 7 месяцев назад
Tc with memoisation will be n^3 because we are calling recursion inside a for loop for every j .
@NazeerBashaShaik
@NazeerBashaShaik 10 месяцев назад
Great explanation, thank you.
@VikasBagri-i5j
@VikasBagri-i5j Месяц назад
understood : ) thanks for this amazing series
@ojasvijgd
@ojasvijgd 7 месяцев назад
UNDERSTOOD THANK u so so much for this amazing series thanks a lottttt
@hetpatel1772
@hetpatel1772 Год назад
Indeed One of the Best DP Playlist for sure.
@shahutsav1661
@shahutsav1661 Год назад
yes it gives TLE by doing it through memoization. tabulation has to be used
@MukeshKumar-cc3uh
@MukeshKumar-cc3uh 8 месяцев назад
Real Quality content here. Thank you Striver. "Understood". ♥
@rishabhgupta9846
@rishabhgupta9846 Год назад
Understood,able to solve the problem by myself.Thank you striver for such wonderful playlist
@NirmalyaMusicOfficial
@NirmalyaMusicOfficial Месяц назад
absolutely clear 💯
@sjulakanti
@sjulakanti 11 дней назад
understood
@pratyakshpandey2248
@pratyakshpandey2248 Год назад
Coded tabulation right away within 10 minutes of reading the question... Thankyou striver!!
@moonlight-td8ed
@moonlight-td8ed 3 месяца назад
thank you striver.. did all the problems from lec 8 by myself.. even space optimization....
@hashcodez757
@hashcodez757 2 месяца назад
"UNDERSTOOD BHAIYA!!"
Далее
DP 13. Cherry Pickup II | 3D DP Made Easy | DP On Grids
43:23
Team Spiderman True Or False Mask,nono #Shorts
00:37
LeetCode was HARD until I Learned these 15 Patterns
13:00