Moral of the story : DP on strings = learn LCS by heart ,❤️ Kudos to your efforts
@vikaskumarnitrr2 жыл бұрын
yes bro
@DeepSingh-zs2oi2 жыл бұрын
definitely bro
@udaypratapsingh89232 жыл бұрын
specially the *tabulation* part :
@shreyasnagabhushan49182 жыл бұрын
exactly , foundation for all DP problems on strings
@arteevraina63342 жыл бұрын
This quote needs to be printed in notes. 🙏
@shridharsarraf21882 жыл бұрын
that feeling of self-improvement when you don't even watch the whole video, and just in between i thought of the solution and wrote it by my own. Amazingly explained striver bhaiya
@theresilientpianist71145 ай бұрын
us moment bro.❤❤
@tanmaisaichennagiri55434 ай бұрын
Us bro us 🥹
@nagasrikuncharapu373610 ай бұрын
was able to solve it without watching the video , but still watched it incase I miss anything important. Thanks a lot
@chitranshjain50752 жыл бұрын
Woah! LCS proved to be a really important topic and thanks to you, I've understood it very clearly!
@amitkulkarni96828 ай бұрын
Solved this after watching 1:49 minutes. There is no better person for DSA than Striver. Huge respect to you 💯
@__ngl__6 ай бұрын
Funny story: I got this question during an interview for a startup and I had no idea it was a dp question, i just did simple hashing for both strings and compared and the interviewer said it wouldn't work but didn't seem to know in what case exactly. He couldn't prove it, so we ran it on their system and they must have had weak test cases because the code came as 100% correct and the interviewer was super impressed and told me that I had taught him a new way to solve the question and I legit got in. I didn't accept because I had one other option but still. (Hashing for this question is completely wrong btw, for anyone wondering, it ignores a very important part of the question which is the order of the letters. You can try the leetcode question and do hashing, you'll see it runs about 900 testcases and fails the rest)
@johncenakiwi2 жыл бұрын
I saw the length of the video and got the hint to solve it with the ongoing pattern (LCS). Coded in under 3 minutes!! Thanks Striver. I think I am really building the intuition for DP problems. I have been with the series from the beginning and I can proudly say that I can solve every single problem in this series till now with ease. I prefer solving using Recursion+Memo but I am also able to write the Tabulation solution for most of the problems. Thanks a tonne brother!!
@aniketghosh20012 жыл бұрын
I read your comment, got motivated, paused the video and thought for a bit, and I also solved the problem all by myself without watching the complete video, now I'm also developing confidence in solving DP problems ^_^
@arpitrajput64242 жыл бұрын
Same in my case , i also saw the length of video then i understand it must be solved by LCS then i solved it without watching the video😃😃
@analyticswithjaspreet2 жыл бұрын
btw writing till memo during interview will not work ? means test cases surely gonna fail ? @Rishabh
@Harshit1262 жыл бұрын
Understood, thanks for making these things like "halwa". At the same time huge respect for the amount of hardwork you must have put in to come up with these amazing (easy) logical explanations! Cheers to you buddy!
@kalpeshpatil62832 жыл бұрын
You are always providing awesome content for any level of coder noob to pro can easily understood the concept and logic.Thank you sir.
@user-of5qt4yn5j2 ай бұрын
I am delighted to share that I successfully solved this problem on my own today, without needing to refer to any algorithm. I am truly grateful for all your efforts, Striver, in helping us along the way
@AppaniMadhavi6 ай бұрын
I Solved without watching, thank you so much striver for providing this wonderful content.
@dhruvdangi8923Ай бұрын
what an amazing job u did teaching us dp in the most beautiful way
@shrikantsahu71152 жыл бұрын
Thanks a lot Striver, I always wondered how to solve DP questions, but now I am able to solve and think on my own!!
@ganeshkamath892 жыл бұрын
Thanks Striver. Understood. I don't know if this intuition will occur to candidates in a real interview.
@utkarshsingh2747 Жыл бұрын
Your previous video gave a thought of using the earlier concept as an application for other questions, just few changes & boom! ❤Your content is just awesome!(Topic - LCS & it's Application XD...!)😆
@KrishnaGuptaTech13 күн бұрын
I did this problem as well on my own, its just learn LCS and boom. Magic happens. Thanks u striver understood !
@himanshuagrawal80122 жыл бұрын
Amazing solution...I wrote tabulated code without watching the solution...Thank you, LCS and Striver💝💝 #UNDERSTOOD
@ProbuddhaSingha-c7r8 ай бұрын
Without even seeing the whole video I got the logic and solved it in leetcode in one go. All thanks to striver. You are GOD of DSA.
@DeepakVerma-iitbhu2 жыл бұрын
This is the first DP on strings question I did by myself ❤️ Thank you so much Striver 🙇🙏
@studygainer54827 ай бұрын
osssm yaaar striver sir love u khud se dp solution hone lga h ab
@acid..924525 күн бұрын
Yes understood bhaiya...Thank you...
@sangeetasharma8574 Жыл бұрын
typing understood has become a formality , cause we r already getting ideas to solve DP problems. Thanks striver.
@shubhankar_naik Жыл бұрын
First time I solved a question without looking at your approach thanks for making LCS easy
@stylish375 ай бұрын
Thanks a lot sir! I used to dread such questions, now I am really enjoying solving 'em.
@lakshsinghania Жыл бұрын
the intuition just striked by it self without watching the video thnx striver!
@nilimsankarbora5911 Жыл бұрын
Mind blowing before watching the video i was able to do this becuz i have watched all the previous videos and i have understood very well this is insane and thank you striver.❤❤❤❤
@rishabhshairy9724 ай бұрын
Solved even before watching this video. LCS is key ❤❤
@ratinderpalsingh59092 жыл бұрын
Understood, sir. Thank you very much.
@anujrathore57265 ай бұрын
DID THIS QUE BY MYSELF , THANK YOU STRIVER
@anshumaan1024 Жыл бұрын
same question @leetcode - "Delete Operation for Two Strings"
@sidforreal2 жыл бұрын
You should also put "Edit path" in title since its popular with that name. Will help in YT recommendation.
@puneetsharma71172 жыл бұрын
This is not Edit Distance problem but very similar to it. You can replace characters in Edit distance whereas only deletion and insertion is possible is this one.
@Himanshhhhxu3 ай бұрын
Hard label dekh ke hamesa fatt jati thi, now solved this problem without watching the video❤ thanks to you
@YashveerGahlot-t6b4 ай бұрын
sir !! your approches are so good and optimal thank you sir!!
@nimmalavishnu30442 жыл бұрын
Understood Raj bro...such a easy and nice explaination
@DevashishJose11 ай бұрын
Understood, thank you so so much, solved it on my own completely
@ranasauravsingh2 жыл бұрын
UNDERSTOOD... !!! Thanks striver for the video... :)
@yashsomani30422 жыл бұрын
Understood, Thank You so much!!
@harshal018 Жыл бұрын
Best Playlist on DP
@saitejakura2 жыл бұрын
mind blowing before watching the video i was able to do this becuz i have watched all the previous videos and i have understood very well this is insane and thank you striver.
@csec056510 ай бұрын
Adding to this : Delete Operation for Two Strings will also be the same solution❤.
@santanu29 Жыл бұрын
I figured it out on my own. Your videos are awesome.
@amishasahu15862 жыл бұрын
Amazing sir!! Understood. You are awesome!!
@xavier4107 Жыл бұрын
We can do this with hashing also... Time complexity is O(S1 length + s2 length). No recursion...
@Anonymous_Coder Жыл бұрын
Did this problem on myself, thanks bhaiya for making such an amazing content.
@adebisisheriff15911 ай бұрын
Thanks sooooooooooooooooooooooooooooooo much striver. This completely amazing!!!
@abdalla4425 Жыл бұрын
Understood, had to take a day off yesterday because of LC contest and was a little tired of nonstop dp haha! Back on the dp so full throttle
@ntgrn-pr5yxАй бұрын
UNDERSTOOD , THANK YOU STRIVER
@rishabhgupta98462 жыл бұрын
understood,solved by myself.If we closely analyse the test cases we know it is n+m-2*LCS
@jonathanjones66572 жыл бұрын
You’re strong.
@arpnasjs9825 Жыл бұрын
Solved before watcing...All thanks to u bhaiya....#UNDERSTOOD!
@soumybisht8 ай бұрын
it was quite similar to the previous question, solved it in just 5min :)
@harshitjaiswal9439 Жыл бұрын
Understood Striver! Thank you for such fantastic explanation!
@hashcodez7574 ай бұрын
"UNDERSTOOD BHAIYA!!"
@Coder-zz1tn8 ай бұрын
"THANKS BRO FOR KEEPING IT SHORT"
@prabhakaran55428 ай бұрын
Understood ❤
@kevbuh4 ай бұрын
Watched every video, great series
@udatyadeb101 Жыл бұрын
yay! did it by myself just reading the question.
@shreyasnagabhushan49182 жыл бұрын
understood bro, I didn't even realise that so many questions could be solved by just knowing LCS .
@lakshaysharma65502 жыл бұрын
UNDERSTOOD!!!🔥🔥🔥🔥🔥🔥
@codewithom11 Жыл бұрын
Previous two questions in dp series, solved by myself . Yup 😎😎
@meetsoni19382 жыл бұрын
Amazing 🤩😄 . Indescribable 💯💯🚀
@aparna53642 жыл бұрын
if we are given different costs for insertions ,deletions and replace operations.Does anyone know how to minimise the cost to convert one string to another
@paracetamol91165 ай бұрын
yeah, instead of doing "1 + helper()" in recursive relations, return "cost + helper()"
@chanchalroy341711 ай бұрын
Without watching this, I was able to solve. 🙌
@vipulchaudhary_js2 жыл бұрын
solved without watching video, Thank You so much Striver bhaiya
@apoorvyadav33782 жыл бұрын
thank you bhaiya for this amaing series
@sagarmittal86272 жыл бұрын
LCS is amazing !!!
@cminor9037 Жыл бұрын
at 2:00 i was able to create logic that answer would be just no of character except the number of character in lcs "US"
@utkarshsingh245 Жыл бұрын
video starts at 3:30
@meme_eternity Жыл бұрын
Solved it just by listening to question OP Striver ❤
@GopalKumar-py2cf Жыл бұрын
this is the 1st question I solved lcs of string
@Hrushi_2000 Жыл бұрын
Understood. Thankyou Sir
@ishangujarathi10 Жыл бұрын
Understood Completely!!!
@warriorgaming9509 Жыл бұрын
Amazing Series Bhaiya Loving it :))))))))
@yeswanthh50682 жыл бұрын
Understood 🙂🙂💚
@HimanshuGupta-ni3pk Жыл бұрын
I love you man for making dp so easy 😂
@UECAshutoshKumar6 ай бұрын
Thank You Understood!!!
@sumitgupta3106 ай бұрын
LCS is King !!
@ronakslibrary8635 Жыл бұрын
US You r teaching is OP
@kumarpurushottam632 Жыл бұрын
Understood Thank You Striver 😇
@fmkhandwala392 жыл бұрын
str.size()+ptr.size()-2*lcs(str,ptr)
@gangsta_coder_122 жыл бұрын
Understood 💯💯💯
@aakashagarwal1462 жыл бұрын
Solved it on my own thanks to striver #UNDERSTOOD
@durgeshsingh10892 жыл бұрын
Can anyone tell me what should we do if the question ask for "REPLACE" , "DELETE" and "INSERT"??
@softwarefoodiee Жыл бұрын
There is nothing to replace actually here because if it exists in both the strings then it will be considered in the longest common subsequence.
@andrewcenteno34624 ай бұрын
This was incredible. I don't understand the theory behind why it works( how you know this is the min there is probably a proof somewhere). But I guess you don't need too for some probrlems.
@radharamamohanakunnattur30352 жыл бұрын
Understood!! awesome explanations!!
@SumitSharma-do2uc2 жыл бұрын
shi m ye subsequence or palidrome k question m kr para hun? ......bachpan m to inke nam se hi dar lgta tha
@kathanvakharia Жыл бұрын
Understood...Completed 30/56
@naveen_kotha2 жыл бұрын
Understood🔥🔥
@adityasai5502 жыл бұрын
aagutalevugaaaa annaaaaaa
@rakeshakkannagari75592 жыл бұрын
aaaaaaaah
@adityasai5502 жыл бұрын
@@rakeshakkannagari7559 nuvvem takkuva kaadu
@rakeshakkannagari75592 жыл бұрын
@@adityasai550 neekanna chaaala takuvva anna
@adityasai5502 жыл бұрын
@@rakeshakkannagari7559 boooo👎
@AquaRegia-i3u Жыл бұрын
Quick Tip:💡If the question is modified that you can only delete or only insert, then also the solution will be same.
@mohammedraqeeb43922 жыл бұрын
understood bhaiya
@rishabhagarwal80492 жыл бұрын
Understood sir , thank you very much
@divyachopra23692 жыл бұрын
What if question says maje str1=str2 or str2=str1 like what if modifications were allowed in both the strings