4.9 Longest Common Subsequence (LCS) - Recursion and Dynamic Programming

  Рет қаралды 1,084,806

Abdul Bari

Abdul Bari

6 жыл бұрын

Longest Common Subsequence Problem using
1. Recursion
2. Memoization
3. Dynamic Programming
PATREON : www.patreon.com/bePatron?u=20...
Courses on Udemy
================
Java Programming
www.udemy.com/course/java-se-...
Data Structures using C and C++
www.udemy.com/course/datastru...
C++ Programming
www.udemy.com/course/cpp-deep...

Пікірлер: 717
@LetsBeHuman
@LetsBeHuman 5 жыл бұрын
Give this man a medal. In 23 minutes, he covered all 3 ways and DP with 2 examples. Just couple of suggestions to win much more subscribers 1) For your videos at least allow auto-translate 2) Instead of directly pasting the code, you can do think-out loud and tell us how you arrived at that code. Man, you deserve a round of applause.
@trango1658
@trango1658 5 жыл бұрын
many thanks from MONTREAL xxx
@bipinbhandari8781
@bipinbhandari8781 5 жыл бұрын
True!
@soumilyade1057
@soumilyade1057 5 жыл бұрын
and also, how to code for memorization. One such example would clarify the concept even better.
@narharimotivaras79
@narharimotivaras79 5 жыл бұрын
true bro! Hatsoff to this Man!
@azadalishah2966
@azadalishah2966 4 жыл бұрын
Soumilya De Memoization ( not memorisation). It means store the result in data structure of ur choice and read from it in next call instead of recalculating again & again. Thus it become faster. If u r not clear let me know.
@prachid3990
@prachid3990 3 жыл бұрын
This is the 60th video I am watching from this playlist, and literally have not come across a single negative/criticising/jealous comment!! Such is the aura of an amazing professor!! Thank you Sir!
@dhruvpatel9957
@dhruvpatel9957 5 жыл бұрын
Attended zero lectures but understood everything from you. I'm a fifth sem student and.....god bless you sir 🤟🤟🤟🤟.
@harshjoshi6257
@harshjoshi6257 4 жыл бұрын
bhai lecture bhi par lena
@dhruvpatel9957
@dhruvpatel9957 4 жыл бұрын
@@harshjoshi6257 8th sem mai aa gaya bro clg khatam hone ko aayi hai.
@harshjoshi6257
@harshjoshi6257 4 жыл бұрын
😂
@sarthakgaba1583
@sarthakgaba1583 4 жыл бұрын
😂
@karanbhatia6712
@karanbhatia6712 4 жыл бұрын
@@harshjoshi6257 Aye tu jaa re! Yaha bhi aa gaya
@siddharthmehta4223
@siddharthmehta4223 Жыл бұрын
15:04 for dynamic programming
@meetshah9510
@meetshah9510 7 ай бұрын
TQ bro❤
@98harshkhulwe43
@98harshkhulwe43 6 ай бұрын
bhai aapko geeli pappi
@ashishdhiwar6226
@ashishdhiwar6226 2 ай бұрын
meri taraf se bhi geeli geeli pappi
@pionerogroup9081
@pionerogroup9081 5 жыл бұрын
I didn't understand anything in my class when my teacher was teaching this topic and I did not even try to understand because I knew that It will be clear only by Abdul sir's videos. You are Great man
@techinframes
@techinframes 4 ай бұрын
so now tell me what didi you understand
@charlesrodriguez6276
@charlesrodriguez6276 3 жыл бұрын
I'm not afraid to say that this man single-handedly got me through algorithms. Thanks for being my and the world's algorithm teacher. You are certainly up to the task!
@TheAndreve
@TheAndreve 4 жыл бұрын
From México, I agree with all the previous comments. Your explanation is clearer than my algorithms course. Great job sir!
@mateussoares7421
@mateussoares7421 2 жыл бұрын
Hello Abdul, how are you? I'm writing this comment just to say that I loved you video and I'm very grateful that there're people like you ready to share knowledge for free that's gold!!!! Thank you very much!
@scholli99
@scholli99 6 жыл бұрын
this guy really understands what he is talking about, unlike the others! Thumbs UP!
@vigneshp9994
@vigneshp9994 2 жыл бұрын
So Mr. Abdul Bari has decided to single-handedly save me from all those unhelpful college lectures. Good, Very good. Thank you :)
@saunakroy2587
@saunakroy2587 6 жыл бұрын
Watched all your KZfaq videos from scratch. Teaching in that way, which is simple to understand and will also be quickly absorbed by the students is an ART. You have got this brilliant ART sir. I have grasped all these concepts before college via your videos. Thanks a lot for providing knowledge for free. You are a real teacher and i hope that you will continue teaching us more through your videos.
@coopjmz9627
@coopjmz9627 3 жыл бұрын
Best algorithm teacher ever! Gotta love the dramatic way you turn to the camera at the end of your videos, when you know everything is explained and all the viewers understood!
@praneetsingh9695
@praneetsingh9695 5 жыл бұрын
you are one of the best teacherr ..happy teacher's day sir
@archardor3392
@archardor3392 3 жыл бұрын
Amazing! How come I have never thought of this solution! So trivial it seems but only when presented to you by such a master! Days, no Weeks of confusing and trying it on my own and now I see clarity! Amazing presentation!
@madinab3610
@madinab3610 4 жыл бұрын
OMGSH, YOU MAKE IT SO CLEAR. Thank you so much for all your hard work with finding the correct examples and making this video so neat and short, but complete. Thank you soo much!
@grasstoucher856
@grasstoucher856 Жыл бұрын
You are my role model in explaining concepts Teacher Abdul. Interesting, clear, and well-paced. I can't thank you enough for sharing this for free. I appreciate you and hope one day I can contribute to maintaining your courses.
@onkartiwari5742
@onkartiwari5742 3 жыл бұрын
I did not no about this gem earlier. how easily he explain the things. thank you so much sir. May god give you all the happiness.
@user-ef8yz9fu5i
@user-ef8yz9fu5i 5 жыл бұрын
too good. I wish all the professor can do and explain like you, so I can understand LCS long time ago. Thank you so much
@prashanthikuchana4144
@prashanthikuchana4144 6 жыл бұрын
There are lot of videos on LCS but this the best and clear explanation I've seen so far. Thank you and my respect to you sir.
@divyanshsharma8983
@divyanshsharma8983 5 жыл бұрын
Sir, you are the first person who made me think about dynamic programming so comfortably,....TONS OF RESPECT
@jimmyp4584
@jimmyp4584 5 жыл бұрын
We can’t thank you enough sir. Simply can’t. Such simple and beautiful way of explanation of complex topics.
@philipanderegg5973
@philipanderegg5973 8 ай бұрын
This guy is single-handedly giving us all our CS degrees despite the terrible profs some of us have in our algo uni courses! Props to this guy, liked and subbed 👌
@shanthansai6377
@shanthansai6377 4 жыл бұрын
The dislikes are from the lecturers/professors who can't teach as good as him.
@ManishKumar-rz9ub
@ManishKumar-rz9ub 3 жыл бұрын
🤣🤣🤣
@kapilgupta8543
@kapilgupta8543 3 жыл бұрын
No, few dislikes are because he just shows how algorithm works. Instead of showing how one can approach the solution without knowing solution already. Because approaching the solution is more important than mugging up solution. For example, he just showed the code for recursion without explaining one can think of writing that code without knowing the solution already.
@FranVarVar
@FranVarVar 3 жыл бұрын
​@@kapilgupta8543 I think that cannot be taught. You just make tables with examples, fill them manually and try to see a pattern. That is my guess but I am not an expert!
@rahmasamy7463
@rahmasamy7463 2 жыл бұрын
@@kapilgupta8543 exactly
@foodiebala1434
@foodiebala1434 2 жыл бұрын
My madam explained it in more detail like him as well but I am going to these for revision. So, not every teacher is like u all thought if u listen to them carefully they will also cover all these topics
@ethanhyde3872
@ethanhyde3872 Ай бұрын
I thought I'd never understand this buy Abdul is an absolute lifesaver. Round of applause
@sameersondur9030
@sameersondur9030 4 жыл бұрын
I really appreciate your way of teaching. Not even for a moment, you made me feel like this is a very complex topic. I have seen very few teachers teach this way. This makes me think how to communicate better with my colleagues. I think the opposite person should not feel like it is a complex issue.
@mail4soumen
@mail4soumen 4 жыл бұрын
Sir, You teaching style is the best till I have seen. I have never seen any other teacher who can explain so nicely. Your is very very much understandable and to the point. I am learning a lot from your KZfaq and Udemy website. Thanks a lot such a wonderful explaining.
@muzammilmueen3487
@muzammilmueen3487 6 жыл бұрын
Awesome .. The best part is that he spent good amount of time to clarify what is the 'actual problem' he will solve ... 10 / 10.
@ahmedalif9989
@ahmedalif9989 4 жыл бұрын
Just awesome!!!! My university's lecturer was failed to explain it and made it hard for everyone. You make it so easy as possible. Hats off sir!
@anirudhreddybasani3555
@anirudhreddybasani3555 6 жыл бұрын
Probably u are the only one who have made such a large number of videos on topics related to competitive programming...lots of respect🙌 sir
@vikasjha8975
@vikasjha8975 4 жыл бұрын
this man is doing great job by helping students with his videos may god fill his all dreams. best wishes )-
@pastafarian8410
@pastafarian8410 4 жыл бұрын
Thank you mr.Bari. Last time I had watched your video , I picked up a very little. Now I could understand thoroughly because I had worked out this problem and it cleared my all doubts and I can apply it some other problems . Moral of the story is work out more problems and come to a such an intelligent teacher .
@himanshuharinandanshukla5543
@himanshuharinandanshukla5543 3 жыл бұрын
our college needs a professor like You Sir ji. Please Complete a series of PYQ of GATE C & DSA. ap hamesha happy and healthy rhe sir ji
@bizzey2714
@bizzey2714 3 жыл бұрын
I’m doing my master's in CompSci and these videos help me in undersyanding the working of the problems so well -- my prof is so so bad omg
@poojaarora6912
@poojaarora6912 5 жыл бұрын
Sir, all your videos of ADA are really very well explained. I will pass in my exams only because of you.... Lots of respect and love to you!
@mayurbajaj5517
@mayurbajaj5517 5 жыл бұрын
Great to see you here Sir, I have attended your classes in ACE for DBMS and CN in 2011 and let me tell you I still hold the notes from your classes and are very very helpful for any interview prep. Thanks a ton (bow)..!!! One suggestion I would like to give for this video is in case of DP solution if you could have explained how the code is derived that would have been more understandable.
@krishnendudutta1465
@krishnendudutta1465 3 жыл бұрын
Which college?
@140_kenguvabhavesh
@140_kenguvabhavesh Жыл бұрын
brother,if possible can you share the notes?if yes,do reply i'll send my mail id
@mirrannas.6892
@mirrannas.6892 3 жыл бұрын
After a horrible horrible lesson about this topic and leave with confusion, I am watching this video and finally understand the topic. Thank you so much ❤️
@darshanyadav7727
@darshanyadav7727 Ай бұрын
after struggling through lot of documents, this video gave me complete and satisfying answer.😊
@GauravMahajanAvaron
@GauravMahajanAvaron 4 жыл бұрын
FINALLY! A video that doesn't have super-technical language and the entire method is so easy to understand.
@chiragsingh9166
@chiragsingh9166 Жыл бұрын
The way he teaches is amazing. I failed to understand this topic in my college but you are the man who helped me understanding this topic I m first semester student of BVoc(software development and E governance) Thanks sir 🙏🏻❤️
@yuxinzhang5094
@yuxinzhang5094 5 жыл бұрын
Best algorithm tutorials I've seen. Lots of respect!
@RaymandShojaie
@RaymandShojaie 4 ай бұрын
This man is a legend, cant say anything more!
@rishabhbandi3368
@rishabhbandi3368 3 жыл бұрын
Sir you are God Gifted. By only listening to your videos before exam brings back the confidence. Not everyone can teach as calmly and confidently like you! Thanks a ton for being saviour of so many students.
@andreysaenko9057
@andreysaenko9057 3 жыл бұрын
just want to say - WOW. Very clear description of LCS problem.
@chinmaydas4053
@chinmaydas4053 6 жыл бұрын
You are the best sir...one problem with ways solution..just great. Lots of respect..
@Anubis10110
@Anubis10110 6 жыл бұрын
Thank you so much Sir, I really wish you all the best. Easy demonstration and great explanation .. Wish I can give you the Golden Medal in Teaching.
@ehsanhosseini5861
@ehsanhosseini5861 4 жыл бұрын
This is the greatest video I have ever seen. Thank you Abdul, you are the best.
@nitishroy6538
@nitishroy6538 5 жыл бұрын
Arey ye itna aasaan hai :) sir, huge respect... guru purnima pe apko naman hai
@minhazurrahman8592
@minhazurrahman8592 5 жыл бұрын
Never understood the diff between memoization and tabulation,thought they were both dp approach.I've just learnt it right now!Best explanation I've found on the internet till now!
@mohammedsaadfazal1556
@mohammedsaadfazal1556 Жыл бұрын
studying 1 hour before DAA exam thanks to Abdul Bari sir
@MustafaKHAN-sw1xb
@MustafaKHAN-sw1xb 6 жыл бұрын
This tutorial is better than others
@gameofthrones91
@gameofthrones91 5 жыл бұрын
We all need videos like these. Thank you. Keep posting!
@demiguo6752
@demiguo6752 Жыл бұрын
Hi Professor Bari--THANK YOU SO MUCH for the videos!!! I'm currently a cs undergrad student taking basic algorithm, and I'm very confused by what I'm learning from school. But I'm so glad I found your videos because you made every algorithm SO CLEAR to me!!! I'm cramping for my midterm this coming Tuesday and having a meltdown because I'm so confused about the algos and your videos saved me. THANK YOU for all your great work!!!
@SouhardyaSutradhar
@SouhardyaSutradhar Жыл бұрын
Can relate. I have my midterms tomorrow. Where are you from btw?
@sarthakmahale1802
@sarthakmahale1802 Жыл бұрын
​@@SouhardyaSutradhar 🫤
@PhuongNguyen-mg8ss
@PhuongNguyen-mg8ss 4 жыл бұрын
Thank you so much, Sir. Your lectures helped me survive in my class during Covid-19:x
@mansmor7211
@mansmor7211 Жыл бұрын
This gentleman is teaching better than my Uni lecturers. He deserves special thank you.🙏🙌🥇🥇🥇🥇
@nickharalampopoulos
@nickharalampopoulos 2 жыл бұрын
Hello Bari, you are one of my favorite teacher, and one of the best on youtube. Thank you for all your efforts.
@rudrakshjhalani1681
@rudrakshjhalani1681 4 жыл бұрын
Searching for a topic and just hoping to find your video on that, cause no explanation can beat yours!! Thank you sir!
@user-pm6gl6yb8q
@user-pm6gl6yb8q 2 жыл бұрын
OMG, this algorithm is so awesome. And the explaination is crystal clear. Much appreciated!
@sarksou
@sarksou 2 жыл бұрын
Sir, I saw this video after watching multiple dp youtube video but somewhere there was gap. But you're amazing, from today any topic first I will search in your channel.. You're too good if there is a match add 1 taking value from previous diagonal else max of previous row/colum.. Superb too good.. Bottom up, top down too good. I wish I watch this video before my amazon interview
@khusbhuverma5345
@khusbhuverma5345 2 жыл бұрын
Sir, the way you explain everything in detail is exceptional! :) Glad to find your channel! :) Thank you very much for all your videos which are truly insightful! :)
@abhinavjha3828
@abhinavjha3828 4 жыл бұрын
Sir You are the best Professor I have ever seen teaching in this simple and effective way
@aravindhravichandran5152
@aravindhravichandran5152 5 жыл бұрын
You are great Sir! Love your lectures. Clear, crisp explanation.
@Tuscani2005GT
@Tuscani2005GT 4 жыл бұрын
Thank you so much for this amazingly clear explanation. If I had to pay in order to subscribe to you I would do so happily!
@zeroone8137
@zeroone8137 6 жыл бұрын
Simply superb. I felt like your lectures were similar to ravindra babu sir's lectures.Both of them lectures are very useful to understand the concepts very clearly. Hands off
@aashishdagar3307
@aashishdagar3307 2 жыл бұрын
I have tried multiple resources,but you are best sir. Time investing here on this channel is worth. Thanks you sir.
@chetanraikwar3546
@chetanraikwar3546 5 жыл бұрын
Best videos on programming I ever found on youtube. Thank you sir, your videos are very helpful in competitive programming. :) After seeing your explanations, I can write correct code on my own. . . . ^_^ Lot's of respect. Please make videos on :- 1. Longest Increasing Subsequence 2. Longest Palindromic Subsequence 3. Edit Distance
@talhayusuf2472
@talhayusuf2472 4 жыл бұрын
Abdul Bari sir, hats off to you. Love from Bangladesh
@shabashachi1238
@shabashachi1238 6 жыл бұрын
Sir, what are subjects , you are teaching? Your teaching method is best. If I listen your video, Then no class, no book is required.
@hoddybhaba6704
@hoddybhaba6704 Жыл бұрын
I have been struggling with LCS understanding and this person has made it look like a cake walk. This is the best explanation.
@emwhite_devil2289
@emwhite_devil2289 Жыл бұрын
Bro can you explain to me why sir taken lcs as "ONE" and not a S in the Sequence Is there a reason in second question
@SoyJayP
@SoyJayP 5 жыл бұрын
I understood it right away watching this video after spending a long time to understand it from other blogs.
@gringoire986
@gringoire986 6 жыл бұрын
Seriously the way this guy explains is the best.
@detaaditya6237
@detaaditya6237 5 жыл бұрын
You just saved my final test, thank you sir :')
@TravellerMann
@TravellerMann 5 жыл бұрын
In simple words..Its WOW !!! Perfect explanation..
@backtobasics6865
@backtobasics6865 4 жыл бұрын
the real professsor....hats off !! thank you : 😊
@DridhaNishchay
@DridhaNishchay 3 жыл бұрын
You are great Sir. Saviour of all students. Hats off to you. Thank you.
@allahakbar9580
@allahakbar9580 5 жыл бұрын
I am not even a computer programmer and I understand what he's saying! He's wonderful!
@rentedunicorn
@rentedunicorn 5 жыл бұрын
This is the best explanation I have seen for LCS.
@venkateshnagubandi754
@venkateshnagubandi754 3 жыл бұрын
One of the best Teachers for programming on KZfaq
@preciousunique6650
@preciousunique6650 6 жыл бұрын
Really excellent explanation for pure and all around understanding. Thank you so much Sir. I am a subscriber of your lectures now.
@AwesomShots
@AwesomShots 2 жыл бұрын
Never got this much easy explanation of recursion. Thank you so much sir for the video
@bryanmax9
@bryanmax9 7 ай бұрын
Thank you so much! Your explanation is awesome and easy to understand. professors like you are the ones who create the best students!🙌
@mini22q11
@mini22q11 5 жыл бұрын
Hats off sir :) I have done my btech in 2010 that time i afraid to read DP but wen i started to read with ur videos they r quick one :)
@utkarshpaliwal411
@utkarshpaliwal411 5 жыл бұрын
Sir, you are God. The way you explained the problem moving from Recursion to DP, explaining at each step the ways in which we can better the current solution, helped me understand this question which used to give me nightmares. Thanks a lot !
@crazyprofz
@crazyprofz 6 ай бұрын
Thanks sir, your explanation is awesome. I love how you explain every single step using hand writing. Clear concept, this is all I need, the rest is just need to convert it to any programming language. I hope you are always healthy there
@khadijahalsmiere3718
@khadijahalsmiere3718 5 жыл бұрын
you saved my life Sir .. thank you very very very much .. //from KSA .
@sapugreat
@sapugreat 5 жыл бұрын
Great job on explaining this, thank you!!
@yessinekammoun1997
@yessinekammoun1997 3 жыл бұрын
Lovely explanation, you have just explained in 23minutes what my teacher didn't explain in 2 hours :D
@pankajkumarbiswas
@pankajkumarbiswas 4 жыл бұрын
awesome explanation!! you have explained this with so much ease..hats of to you.
@celalozdemir8565
@celalozdemir8565 2 жыл бұрын
You are incredibly talented sir thank you so much for your efforts they really have an effect and you are teaching us what our universities can't.
@coledrain2158
@coledrain2158 4 жыл бұрын
My lecturer just explained it to us vaguely. But now I see why some things happen. Thank you Sir.
@Sol3Z
@Sol3Z 9 ай бұрын
I love you😂 I got this video in my recommendation 1 hour before my exam and this problem was the "hard" task of my exam :)
@hamdancodes7900
@hamdancodes7900 4 жыл бұрын
How simply you have taught everything in such a difficult topic... Thank you sir ...
@bastawa
@bastawa 5 жыл бұрын
The best explanation ever❤️🙏👍🏻
@rhkvineel4098
@rhkvineel4098 4 жыл бұрын
Abdul bari sir, super explanation sir, the best ever I had seen in my life.
@NoorFatima-pf1sq
@NoorFatima-pf1sq 5 жыл бұрын
I have no words.. Your teaching style is amazing awesome too good thank you sooo much Sir Allah bless You...…….
@skubydubydu
@skubydubydu 6 жыл бұрын
Please make more videos. Your explanation was the easiest to understand among all the videos I have seen for this algorithm.
@ammarhossain6095
@ammarhossain6095 6 жыл бұрын
You are really awesome, U make Hard problems easy to easier.
@piyushsharma1638
@piyushsharma1638 6 жыл бұрын
you are awesome sir, reminded of my Teacher in school.
@MegaPaloma1988
@MegaPaloma1988 5 жыл бұрын
wonderful videos .. very good pedagogy .. please keep doing this great job ! Thanks !
@sazzadhossain2257
@sazzadhossain2257 3 жыл бұрын
Thank you sir for your hard work .You are helping students like me all over the world . Great tutorial.
@wayneqwele8847
@wayneqwele8847 4 жыл бұрын
this is an amazing way to explain the concept.
5 Simple Steps for Solving Dynamic Programming Problems
21:27
Reducible
Рет қаралды 1 МЛН
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 8 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 20 МЛН
7.3 Traveling Salesman Problem - Branch and Bound
24:42
Abdul Bari
Рет қаралды 1,7 МЛН
Longest Common Subsequence- Dynamic Programming | Data structures and algorithms
25:47
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 627 М.
Memoization (Explained)
3:00
TheVimeagen
Рет қаралды 15 М.
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Abdul Bari
Рет қаралды 2,7 МЛН
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22