listen man , this is the best shoki in thw world i understand everything but shir doesnt understand but now she will understand so slozki is the world have a good night
Hello! I stayed all day to read and understand this method, and nothing...then, I found your video and I have understood. It is the best explanation!! I will be happy if you will put the algorithm in C++, as soon as posible. Thank you a lot!!
I know it's late but I want to give you a very big thanks. this video really helps me understand how to code the LCS. that I used in Undergraduate Research :)
Great work... I could not understand a thing when this was taught in class. But i understood perfectly here.. I m still confused why i could'nt get it in class :/
The algorithm only gives you one of the longest subsequences. If there are multiple, taking different paths will give different subsequences. If you want all of them, you must traverse all paths.
good catch! There are only 2 answers if Left and Up are the same length and no diagonal exists on that entry. Since to get to that point you had to choose between 2 strings of equal length, thus both paths must be taken to derive answers
The logic is simple here, let LCS [i,j] represent longest common substring of a[1...i] and b[1..j]. if (a[i] == b[j]) LCS[i,j] = LCS[i-1,j-1] + 1; else LCS[i,j] = max(LCS[i-1,j], LCS[i,j-1]);
Why do we have to get the max of L[i-1][j] and L[i][j-1] if no commonality is found? Is it because of the 0's in the first row and column? Because for other cases, the max is always the cell to the left. Am I right?
Why does the LCS of ABCB not work as well? I also noticed that you found this exercise in the Introduction to Algorithms textbook which I am currently using for my course.
When you start in the corner, you decide if you will follow a pattern left top , or top left and you follow that for the entire journey, To answer your question: if you can go left or top - yes, you must go this direction.
hello sir, It is an awsome video.. thanks a lot :-) I have one query i.e., Determine LCS of and I have the answer but i don't know how to solve this question.. please help !!!!!! Actually, this question was asked in last year exam paper and tomorrow is my exam .. REPLY SOON...!!
ok.. but in this video, if alphabets are matched then we add 1 and the answer i have to my question ..in that if the nos. are matched then 1 is added but it's written like this .. 011
you should make more algorithm videos. you're really good at explaining.
Yes we need more
Great explanation. My prof didn't teach it this way, but makes the dynamic programming solution so much clearer!
8 years later and his solution is better than my prof😂
@@AbdulwahabSWE same 😂
wow I understand this very easily. thanks. the other explanations are too complicated and I don't have much time to study lol
listen man , this is the best shoki in thw world i understand everything but shir doesnt understand but now she will understand so slozki is the world have a good night
Wonderful explanation! You are a great teacher!!!
Hello! I stayed all day to read and understand this method, and nothing...then, I found your video and I have understood. It is the best explanation!! I will be happy if you will put the algorithm in C++, as soon as posible. Thank you a lot!!
Thank you so much! I want to see more algorithm videos from you as you're really good at explaining them!
thank alot,Daniel Sodkiewicz very simple to understand
I know it's late but I want to give you a very big thanks. this video really helps me understand how to code the LCS. that I used in Undergraduate Research :)
please upload more videos on (dynamic and greedy) algorithms, You are a great teacher
Very easy and understanding method sir keep it on
Thanks man it's great explanation of the algorithm i read some blog about it but they always make stuff complicated for no reason.
u did a gr8 job!!... just took 8 mins and several questions of LCS SOlved...:)
Ya vid help me a lot during my exam thank you so much 🙏🏿
Thanks bro you just saved my CAT tomorrow😇
This is good. Thanks for taking time to put it together.
Great! Very clean explanation. Thanks mate
Thanks for this video. I needed to see it being done to really get it.
thank you so much sir, finally i can understand it more better
Nice and quick explaination, thank you.
Thank you!!!!!
공부중에 LCS가 이해가 전혀 안 됐었는데, 덕분에 이해가 되었어요! 정말 감사합니다!!!
Simple explanation. Thanks
Thank you so much for this explanation, my teacher was for the κάτσαρα!
can you teach this to my teacher too??
damn she made this so difficult to understand!
Dhanyawad(Thank You)!
My teacher is the same !
Yo fckin same here...i hate my teacher
same with me, my prof is always make anything dificult..
Thanks for such an awesome explanation
Hi Dear Sir,
A great work you have done , thanks alot
Anes
nice you explained in a very simple manner. thanks
Thank you for your video! Helped me before a test!
You did well, sir. Very well. Thank you
Nice tutorial! Than you Daniel.
Great work... I could not understand a thing when this was taught in class. But i understood perfectly here.. I m still confused why i could'nt get it in class :/
Thanks and good work but
I think ,there are 2 LCS is possible from the table you created. so, If you show all the possible LCS ,it will be good .
Perfectly done!! Helped a lot!!
Awesome explanation.Fount it very helpful.
Thanks mate.
Great explanation. Thank you.
Thank you. Saved my life.
Thanks mate! This is gonna help me a lot in my exam tomorrow lol
Thanks ..You made it super easy...
This explains it so well!! Thank you!
Dude you are the best... Thank you!
Great work i wish you did more videos :)
perfect, nicely done. you rock man
Thank you very much, that was very lucid.
Thank you daniel.U made it easy
Thank you! Very clear explanation!
Nice explanation, thanks!
very well explained. thank you
Thank you so much. Very nice one.
It's a great illustration.
Thanks a lot for this video!
Hi there, are you able to do a video on Boyer Moore pattern matching algorithm with last occurrence table
if u go UP and LEFT its BCBA
if u go LEFT and UP its BDAB
2 answers !
Tufayel Talha how to correct it then
The algorithm only gives you one of the longest subsequences. If there are multiple, taking different paths will give different subsequences. If you want all of them, you must traverse all paths.
I think It is okay to have two answers as long as the solution is optimal (one of the longest sequences).
good catch!
There are only 2 answers if Left and Up are the same length and no diagonal exists on that entry. Since to get to that point you had to choose between 2 strings of equal length, thus both paths must be taken to derive answers
Great video, you explained everything very clearly, you saved my ass
Superb Sir
nice..!
Easy to understand..!
very nice explanation :)
thanks alot....kindly teach my teacher if u can.....
thanku sir....u taught well
Such a great tutorial.
The logic is simple here, let LCS [i,j] represent longest common substring of a[1...i] and b[1..j].
if (a[i] == b[j])
LCS[i,j] = LCS[i-1,j-1] + 1;
else
LCS[i,j] = max(LCS[i-1,j], LCS[i,j-1]);
thanks sir very nice explanation
So the subsequence doesn't have to match exactly, just be in order? One has BDAB but the other has BDCAB.
Yes, you are correct
nice explanation !
Are the tracking results the same if I swap rows and columns?
This was really helpful!! Thanks!!
Thanks so much! this totally helped me understand!
Why do we have to get the max of L[i-1][j] and L[i][j-1] if no commonality is found? Is it because of the 0's in the first row and column? Because for other cases, the max is always the cell to the left. Am I right?
Why does the LCS of ABCB not work as well? I also noticed that you found this exercise in the Introduction to Algorithms textbook which I am currently using for my course.
yes, there are few correrct solutions
perfectly tailored till required
Nicely taught
helped a lot..thanks for uploading it :)
thanks a ton man..This helped alot.
thanks! super helpful.
another awser is BCBA,Which one should we choose?
nice and concise..
thanks for sharing, you saved my day! =)
thank you, it's a great video !!
awesome vid 👍
Omg i love you
its help me so much
7:35 u went to top twice didn't follow top left sequence
very consise, much appreciated
Thanks! found it helpful!
absolutely thanks bro
Nice one man
thanks for this video sir :)
Thank u so much....👍👍
couldn't we go from ones to zeroes on CB? there was a bridge over there or if there's a chance to go left or top we should use it always?
When you start in the corner, you decide if you will follow a pattern left top , or top left and you follow that for the entire journey, To answer your question: if you can go left or top - yes, you must go this direction.
just curious did u film it with ur cellphone
LUX1111111111111 indeed :)
thank you so much !
Thank you for your video. I am very grateful.
You have helped a lot. :D
I found another two results.
Result 1 is: B,C,B,A
Result 2 is: B,C,A,B
Result 3 is(your result): B,D,A,B
I found the BCBA. Can there be multiple correct answers in LCS?
@@doosc I guess yes
thnks.lve frm Bangladesh
Thanks a lot!
Nailed it !
but how is BDAB a subsequence of BDCABA?
awesome !!thnks :)
THANK YOU SO MUCH MAN YOU ARE LOVE YOU ARE LIFE... COZ U JUST SAVED MY ASSS FROM FAILING XD
Thanks!!!
Nice one :)
hello sir,
It is an awsome video.. thanks a lot :-)
I have one query i.e., Determine LCS of and
I have the answer but i don't know how to solve this question.. please help !!!!!!
Actually, this question was asked in last year exam paper and tomorrow is my exam ..
REPLY SOON...!!
Hi, try to follow the video. Just instead of letters use your numbers, one set will go horizontally, an another vertically.
ok.. but in this video, if alphabets are matched then we add 1 and the answer i have to my question ..in that if the nos. are matched then 1 is added but it's written like this .. 011
Mandeep Kaur why study last minute