DP 33. Edit Distance | Recursive to 1D Array Optimised Solution 🔥

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2025
  • Lecture Notes/C++/Java Codes: takeuforward.o...
    Problem Link: bit.ly/3HcTJdy
    Pre-req for this Series: • Re 1. Introduction to ...
    a
    Make sure to join our telegram group for discussions: linktr.ee/take...
    Full Playlist: • Striver's Dynamic Prog...
    In this video, we solve the Edit Distance problem.
    If you have not yet checked our SDE sheet, you should definitely do it: takeuforward.o...
    You can also get in touch with me at my social handles: linktr.ee/take...

ความคิดเห็น • 581

  • @Anonymous-uj3jx
    @Anonymous-uj3jx 2 ปีที่แล้ว +528

    Hey Striver, I got this question in my Microsoft Internship Interview today, without your video I would never have solved this question so perfectly, the interviewer is indeed amazed by the space optimization that I did! Thank you so much!

  • @RaghavSharma-nt3hr
    @RaghavSharma-nt3hr 2 ปีที่แล้ว +280

    After 33 lecs, 90% effort is for recursion 10% effort for memo,tabulation.space opti.
    if u master recursion all the next 3 things are piece of cake.

    • @AshishKumar-ww1mr
      @AshishKumar-ww1mr 2 ปีที่แล้ว +11

      true , we just need to understand the recurrance , its more about the question than dp itself

    • @muditkhanna8164
      @muditkhanna8164 ปีที่แล้ว +1

      they say just trust the leap of faith and trust PMI , and recursion is done, i didn't do that. and i'm glad i did it my way!

    • @imPriyansh77
      @imPriyansh77 7 หลายเดือนก่อน +1

      Yes, agreed :)

  • @karanthakur11
    @karanthakur11 ปีที่แล้ว +7

    Method 1)-- recursion
    i=str1_hourse || intention, j=str2_ros || extention ()
    1.1)
    13:37 insert operation
    15:24 delete operation
    16:41 replace operation
    1.2)
    min
    1.3)
    Base case 17:58
    s1 exeusted 18:52 (min op to convert str1 to str2 (j+1))
    s2 exeusted 20:56 (min op to convert str1 to str2_khali dusri (i+1))
    1.4) space O(N+M)
    and time complexity (exponential e^x) 22:05
    Method 2)-- recursion memoisation 23:21 + tc & sc 23:30
    2.1)-- to reduce oxillary stack space present in rec_memo we use tabulation
    Method 2)---tabulation &
    space optimisation
    2.1) 26:58 to 28:35 one based indexing (slight change)
    2.2) base case 29:24
    2.3) I j ( bottom up= tabulation) 30:40
    2.4) copy the recurrence
    2.5)Code - 31:06
    *2.6) space opt---33:16
    2.7)concept of space optimasation 33:48
    2.8)Code

  • @alifarah9
    @alifarah9 2 ปีที่แล้ว +23

    Thanks

  • @amancuber5235
    @amancuber5235 2 ปีที่แล้ว +38

    Hey striver,
    I was able to do it myself and all the credit goes to you and aditya Verma!
    Thanks a lot

  • @pavannettam8968
    @pavannettam8968 ปีที่แล้ว +14

    I’m following the DP play list from the beginning. What an amazing way to deliver content, I’m really amazed to see clarity in the steps thought. Thank you sooo much :)

  • @anuragpandey8165
    @anuragpandey8165 2 ปีที่แล้ว +27

    Hey Striver, I got the space optimization logic in the first time without looking at solution and wrong answer. All thanks to you man!

  • @_Kunal_Pawar
    @_Kunal_Pawar 11 หลายเดือนก่อน +1

    I've gotta say, your way of teaching is pretty awesome. I haven't come across any other TH-camr breaking down tricky stuff like you do. It's obvious you've put in a ton of work to make things easy to understand 💯

  • @shantipriya370
    @shantipriya370 ปีที่แล้ว +3

    first it seemed extremely complicated, but towards the end as it unfolded, it was very clear.. u r an amazing teacher..

  • @suhasherle7350
    @suhasherle7350 ปีที่แล้ว +5

    Initially I thought I won't be able to solve this question by myself, but I spent some time on it, thought about the different possible cases, and got the solution on my own. Your videos are just amazing !!

  • @iamnoob7593
    @iamnoob7593 2 ปีที่แล้ว +6

    Hey Striver , Man ur videos are just superbly fantastic. I knew only how to recursion + memo dp for the past 2years , But i did not know Bottom up dp. I could not clear online test rounds due to TLE. Now after watching ur videos in dp bottom up/recursion approaches . I got some hope that i can crack interviews in product based.

  • @sarthakyadav9950
    @sarthakyadav9950 ปีที่แล้ว +3

    After so many lectures it is clear that the hardest part is to figure out the recursion. After that memoization,tabulation and space optimization is a piece of cake.

  • @sasageyo9571
    @sasageyo9571 2 ปีที่แล้ว +2

    Jus Amazing....................................................
    best explanation of edit distnce ever ....................
    explained all cases with such elegance and clarity 🙏🙏

  • @sahilbadkul7130
    @sahilbadkul7130 2 ปีที่แล้ว +5

    You explain in such a way even a kid who do not know any thing related this, will understand😄.
    Amazing video, definitely understood.

  • @ankitpandey7262
    @ankitpandey7262 2 ปีที่แล้ว +2

    Written Space Optimised Solution without Watching this Video ..... This show the level of concept your previous videos built. Thanks ✨💯

  • @namangarg8976
    @namangarg8976 ปีที่แล้ว +1

    What a wonderful person you are. I solved this problem without viewing the video because of your previous videos

  • @stith_pragya
    @stith_pragya ปีที่แล้ว +3

    UNDERSTOOD.........Thank You So Much for this wonderful video........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @parthh3963
    @parthh3963 5 หลายเดือนก่อน +3

    Today is 4th September
    Tomorrow is 5th september which is teacher's day,
    And I want to thank this amazing teacher of ours.
    Thankyou Raj
    Thankyou Striver
    You're one of the best teachers I have got in my life.

    • @PraSHanTlifts78
      @PraSHanTlifts78 5 หลายเดือนก่อน +1

      Yes bro i am also following the dp series and doing codes effortlessly ❤ Happy Teachers day My Best Teacher striver Gurujii ❤❤

  • @InWonderland-z2l
    @InWonderland-z2l 7 หลายเดือนก่อน +1

    The key thing to understand is that we don't ACTUALLY have to insert, delete or replace.. we only have to count the operations. This kind of observation may seem dumb at first glance, but when approaching this problem (or similar problems) myself, this is the major thing that causes a mind block and keeps me from getting to the solution.
    Great video!!🙏

  • @Parthj426
    @Parthj426 7 หลายเดือนก่อน

    understood , and i'll like to mention that till today i was a bit confused abt the working of 2 arrays space optimisation , but after dry run , it got absolutely clear.
    thanks for this whole DP series , enjoying it too much.

  • @mdmudassiralam5490
    @mdmudassiralam5490 2 ปีที่แล้ว +23

    Hey striver, U taught us in such a way that now LC hard problems seems to be easy. I could have solve last 3 questions including this one without watching the video. Thanks a lot for such a great content ❤️.

    • @GajendraSingh-lv3jw
      @GajendraSingh-lv3jw 2 ปีที่แล้ว +2

      i have solved the last 6 question by myself now without watchinng the video... thts how good is his content

  • @badhautiyaakash2
    @badhautiyaakash2 4 หลายเดือนก่อน +1

    I having more confident now in dp , thank u striver bhaiya.

  • @RupamSasmalYt
    @RupamSasmalYt 2 ปีที่แล้ว +8

    Trust me I've just watch till 8:04 and thereafter I've solved till space optimization by my own! it's totally striver magic!! damn self confidence boost towards DP 🔥🔥

  • @uddeshyatyagi5
    @uddeshyatyagi5 2 ปีที่แล้ว +6

    Amazing Striver, you made me understand this question so easily !

  • @muskanchaurasia1532
    @muskanchaurasia1532 ปีที่แล้ว

    This man is no doubt a genius .You literally made tough topics seem so easy.

  • @dipanshusharma9084
    @dipanshusharma9084 2 ปีที่แล้ว +19

    Note : you cannot return cur[m] because , in the case when str1 is empty and str2 has element , only prev array stores the corresponding m value

    • @OMPRAKASH-is7fj
      @OMPRAKASH-is7fj ปีที่แล้ว +2

      True ... because of this only all test case was not passing in leetcode

  • @kiranraaj7889
    @kiranraaj7889 ปีที่แล้ว +2

    i could solve this on my own, this feels so great, thanks for the previous videos!

  • @inspirewithvikash5941
    @inspirewithvikash5941 7 หลายเดือนก่อน

    Very Well Explained , I watched till 14:26 and then i solved it on leetcode.

  • @animearena8443
    @animearena8443 2 ปีที่แล้ว +1

    solved by myself. can't believe these used to look horrific a month ago. Thanks a ton man!

  • @PraSHanTlifts78
    @PraSHanTlifts78 5 หลายเดือนก่อน +1

    i am also following the dp series and doing codes effortlessly ❤ Happy Teachers day My Best Teacher striver Gurujii ❤❤

  • @anchalsharma5777
    @anchalsharma5777 ปีที่แล้ว +3

    It's impressive how you've explained this question not just for the sake of solving it, but to foster the development of problem-solving skills. I genuinely wish you achieve great heights in your life. Your efforts are truly appreciated. Today, I learned about your medical condition, and I'm amazed that despite that, you put in such dedicated efforts. Hats off to you!

  • @anveshkarra3861
    @anveshkarra3861 2 ปีที่แล้ว +1

    Scared a lot by seeing the question that how we can solve it but after watching the video , the concept is crystal clear . Enjoyed it a lot

  • @abdalla4425
    @abdalla4425 ปีที่แล้ว

    What a wonderful challenge! At first, I though this would be really tricky since we had to keep track of replacing but if we just move the index around and count them, it does all the work since we don't have to print anything. Really like this question! Understood as usual.

  • @umangkumar2005
    @umangkumar2005 ปีที่แล้ว

    you are the best teacher and the whole code i had written by myself without seeing your video

  • @srijanprasad8319
    @srijanprasad8319 2 ปีที่แล้ว +1

    literally THE BEST EXPLANATION for the problem

  • @vanshsehgal9475
    @vanshsehgal9475 2 ปีที่แล้ว +9

    Hey Striver! We can actually space optimise it to 1D array. If we see carefully see that from the prev row, we only require j-1 so why not store that in temp variable. Below is my code in C++:
    class Solution {
    public:
    int minDistance(string word1, string word2) {
    int n1=word1.size();
    int n2=word2.size();
    vector dp(n2+1,0);
    dp[0]=0;
    for(int j=1;j

    • @takeUforward
      @takeUforward  2 ปีที่แล้ว +10

      Yess, my teachings 🥹

    • @vanshsehgal9475
      @vanshsehgal9475 2 ปีที่แล้ว +3

      @@takeUforward yeah. Surely it's your teaching💯🔥

    • @techspecstm7032
      @techspecstm7032 2 ปีที่แล้ว

      @@vanshsehgal9475 why this way of writing separately for all possibility is not working?
      static int f(int i,int j,String stri, String str2)
      if(i

    • @vanshsehgal9475
      @vanshsehgal9475 2 ปีที่แล้ว

      @@techspecstm7032 bruh!! You mistakenly passed in replace function call in 1st param as 1-1. It should be i-1.

    • @techspecstm7032
      @techspecstm7032 2 ปีที่แล้ว

      @@vanshsehgal9475 That was my typo mistake... It's correct in code but I am not getting the correct output. Am I correct in defining the recurrence?

  • @shashankrustagi9822
    @shashankrustagi9822 9 หลายเดือนก่อน

    The way Raj teaches, I am able to feel he is crazy for DSA and coding and he is the best teacher ever!!!
    That is what a true teacher needs to be.

  • @ArdentMusicLover
    @ArdentMusicLover 10 หลายเดือนก่อน

    Thank you, Striver for this outstanding series on DP. I've been following every DP video of yours. One intuition that I explored for this problem before abandoning it was using the LongestCommonSubsequence logic. I wish you would've added explanation on why LCS approach wouldn't have worked well for this problem. After all , if you subtract out the LCS value , I would've thought using the remaining characters from both would've been enough to come up with answer.

  • @Telugu_europe
    @Telugu_europe 2 ปีที่แล้ว

    Understood... really liked your sense of humour while explanation at 16:50

  • @AnanshGupta
    @AnanshGupta 5 หลายเดือนก่อน

    The best thing about Striver's video is you don't need to watch the full video sometimes, as he is explaining the problem or explaining the approach to question the solution just clicks to you . Dont even need to look at the code. Best feeling ever when its a difficult topic or approach.

  • @hashcodez757
    @hashcodez757 6 หลายเดือนก่อน

    Bhaiya i have no words ........just a smile on my face full of gratitude !!
    Thanks alot for your hard work and support

  • @souvikbhattacharjee2210
    @souvikbhattacharjee2210 2 ปีที่แล้ว +3

    Thank you so much for putting this much effort..I never thought i would do this type of hard quiestions on my own..

  • @Sumit-wy4zp
    @Sumit-wy4zp ปีที่แล้ว

    super duper easy ... thankyou so much striver your teaching style is something different 😍😍😍

  • @your_name96
    @your_name96 2 ปีที่แล้ว +1

    Thanks a lot again! I was always confused between insert and replace , this video finally cleared it all, also would like to add, the order is kinda important I think, like i variable is for the string that needs to be changed, j variable is kinda the target string but that does not change the answer as cost of insert for one string is the cost of deletion of another string so operations are equivalent. Correct me if I am wrong though.

  • @neerajgupta9151
    @neerajgupta9151 ปีที่แล้ว

    bhaii kya smjhata h ye banda🔥🔥🔥🔥
    wish saare teachers aise hote

  • @JIGARSINGTHAKOR-yy6qp
    @JIGARSINGTHAKOR-yy6qp 10 หลายเดือนก่อน +1

    awesome explanation but one thing is that you should have also need to explain why not performing operation on 2nd string

  • @rajeshseptember09
    @rajeshseptember09 ปีที่แล้ว

    It is actually a very simple problem after you have simplified it so much !

  • @gametech7046
    @gametech7046 2 ปีที่แล้ว +8

    Hey striver,
    I was able to solve this question today... all by myself and felt a relief that maybe there is a chance for me to get a decent package coming from Tier-3 college. And this is possible only and ONLY because of your lectures. I know saying thank you doesn't mean much, but Thank You! from the bottom of my heart. I am not financially independent as of today, but I promise... the day I am, you are one of the first person that is going to pop in my head and I will definitely gift you something. Thank You So MUCH!!!

  • @sanjivaniburma6171
    @sanjivaniburma6171 9 หลายเดือนก่อน

    Hey Striver, you are great man able to write the recursion on my own for this problem thanks to your series.
    I'm so happy now, its a max level of satisfaction...!
    Thanks sir for all of this

  • @543-kishorebugatha7
    @543-kishorebugatha7 ปีที่แล้ว

    Love you Bro without your videos dp is like a nightmare to me . Thank you for your wonderful explaination and the for the time you spent to do this series.

  • @shambhavikhare9850
    @shambhavikhare9850 ปีที่แล้ว +1

    Understood. extremely simple explanation, thankyou so much!

  • @BruceWayne-lm6xt
    @BruceWayne-lm6xt หลายเดือนก่อน

    This was a tough question,and I have seen this lots of time in Contests
    Now I understood how to solve these kind of question
    THanks to you

  • @shubhrajit2117
    @shubhrajit2117 หลายเดือนก่อน +1

    At 24:40
    Starting from C++11, you can use std::min with an initializer list like
    _min({delete, replace, insert})_

    • @Prakhar-ie1wk
      @Prakhar-ie1wk หลายเดือนก่อน

      you need to add algorithm header file to use that.

  • @chandrachurmukherjeejucse5816
    @chandrachurmukherjeejucse5816 ปีที่แล้ว +1

    Hello Striver. Thanks a lot for the amazing content. Solved the ques by myself just after understanding the question. Got a dopamine hit today.

  • @pulkitchausali1354
    @pulkitchausali1354 2 ปีที่แล้ว +1

    Striver dp is best in the universe I can say no one can match this level amazing series
    Dynamic Programming is like peace of cake
    ❤❤❤❤❤💯💯💯💯💯💯

  • @ganeshkamath89
    @ganeshkamath89 2 ปีที่แล้ว +2

    Thanks Striver. Understood. Really enjoying the series.

  • @MeenakshiSharma-bd3bu
    @MeenakshiSharma-bd3bu 2 ปีที่แล้ว

    thankyou bhaiya , previously i was having a fear of DP, but after reaching at this video , i was able to do this hard question by myself.............and m so much happy ,thank you for helping🥺❤

  • @googleit2490
    @googleit2490 ปีที่แล้ว

    Understood :)
    Self-done it fully, thanks.
    July'30, 2023 23:42 pm

  • @SreyesSrinivasan
    @SreyesSrinivasan 2 ปีที่แล้ว

    Amazing solution Striver! Thank you so much for explaining it so patiently!!

  • @reppee4392
    @reppee4392 ปีที่แล้ว

    understood!!! i can't believe i did last 2 qs by myself 🔥

  • @himanshuagrawal8012
    @himanshuagrawal8012 2 ปีที่แล้ว +2

    Amazing Problem , Solved by myself own a LEETCODE Hard ❤❤ !! #UNDERSTOOOOOOOOOOOOOOOOD
    I am back, gone for College Exams

  • @shriRadheHariom
    @shriRadheHariom 6 หลายเดือนก่อน

    Understood sir,Honestly, you are the best.

  • @shalinice3677
    @shalinice3677 2 ปีที่แล้ว

    Thank you so much bhaiyya for this wonderful playlist, I have improved a lot on how to approach a problem and today I could solve this problem without even starting this video. Keep spreading the knowledge!!

  • @girava4034
    @girava4034 6 หลายเดือนก่อน

    Hey man you are amazing, Thank you for you hard work, you touched every aspect of the problem, but you didnt explain why you start from the beginning of the strings.

  • @shubhammalviya3001
    @shubhammalviya3001 2 ปีที่แล้ว +1

    Amazing you made it look very simple ,also the optimisation part was great 🔥

  • @JoyBoy_013
    @JoyBoy_013 6 หลายเดือนก่อน +1

    God Level Explanation.

  • @_sf_editz1870
    @_sf_editz1870 11 หลายเดือนก่อน

    my interviews will be in 3 months i masterd top down and bottom up and thank you striver

  • @rishabhgupta9846
    @rishabhgupta9846 2 ปีที่แล้ว

    Understood,after getting Intuition that we can either replace ,delete ,insert a character to make it equal to other writing recursion was super easy.Just need to figure out base cases.

  • @LetszGoo
    @LetszGoo 2 ปีที่แล้ว

    thank you sir. here after watching *distinct subsequences*.
    and i am able to make recurrence by my self. 🌝🌝

  • @girishbhargava6367
    @girishbhargava6367 2 ปีที่แล้ว

    Best playlist of DP that anywhere exists.....

  • @prabhakaran5542
    @prabhakaran5542 10 หลายเดือนก่อน +1

    Understood ❤

  • @reeteshtiwari5257
    @reeteshtiwari5257 ปีที่แล้ว

    You are an absolute genius man!!

  • @engg.5111
    @engg.5111 ปีที่แล้ว

    did complete question by own after learn about else 1st case(insert) striver supermacy thankyou striver

  • @Yag116
    @Yag116 ปีที่แล้ว

    Very very good explanation!! UNDERSTOOD!!

  • @ritikshandilya7075
    @ritikshandilya7075 7 หลายเดือนก่อน

    Thanks for great explanation Striver

  • @UECAshutoshKumar
    @UECAshutoshKumar 7 หลายเดือนก่อน +1

    Thank you
    Understood!

  • @souvikbiswas284
    @souvikbiswas284 5 หลายเดือนก่อน

    Hey @striver, you can actually space optimize it to 1 row, you just need to have a variable which will store the prev value of j-1 index

  • @ashhere5385
    @ashhere5385 ปีที่แล้ว +1

    I am truly amazed by your ability to simplify such complex problems. How do you make it look so easy every time?
    Can't thank you enough for this series. You're the best! 💯✨️

  • @siddharthchauhan3787
    @siddharthchauhan3787 10 หลายเดือนก่อน

    amazing shortcut for python users no need to do memoization manually just use lru cache decorater
    class Solution:
    def minDistance(self, word1: str, word2: str) -> int:
    @lru_cache(maxsize=None)
    def helper(i,j,s1,s2):
    if i==-1:
    return j+1
    if j==-1:
    return i+1
    if s1[i]==s2[j]:
    return 0+helper(i-1,j-1,s1,s2)
    insert = 1+helper(i,j-1,s1,s2)
    delete = 1+helper(i-1,j,s1,s2)
    replace = 1+helper(i-1,j-1,s1,s2)
    return min(insert,delete,replace)
    return helper(len(word1)-1,len(word2)-1,word1,word2)

  • @manishbolbanda9872
    @manishbolbanda9872 2 ปีที่แล้ว

    you explain DP very well. Thanks fpr making this video :)

  • @sharmilasiram5438
    @sharmilasiram5438 9 หลายเดือนก่อน

    I have did it in my own!
    class Solution(object):
    def minDistance(self, word1, word2):
    """
    :type word1: str
    :type word2: str
    :rtype: int
    """
    if word1 == "" and word2 == "":
    return 0
    if word1 == "":
    return len(word2)
    if word2 == "":
    return len(word1)

    def help(i, j, s, t):
    if j < 0 and i < 0:
    return 0
    if i < 0:
    return j + 1
    if j < 0:
    return i + 1
    if s[i] == t[j]:
    return help(i - 1, j - 1, s, t)
    insert = help(i, j - 1, s, t) + 1
    remove = help(i - 1, j, s, t) + 1
    replace = help(i - 1, j - 1, s, t) + 1
    return min(insert, remove, replace)

    #dp = [[-1 for i in range(len(word2) + 1)] for j in range(len(word1) + 1)]
    current = [-1 for i in range(len(word2) + 1)]
    prev = [-1 for i in range(len(word2) + 1)]
    for i in range(len(word1) + 1):
    for j in range(len(word2) + 1):
    if i == 0 and j == 0:
    current[j] = 0
    elif i == 0:
    current[j] = j
    elif j == 0:
    current[j] = i
    elif word1[i - 1] == word2[j - 1]:
    current[j] = prev[j - 1]
    else:
    insert = current[j - 1] + 1
    remove = prev[j] + 1
    replace = prev[j - 1] + 1
    current[j] = min(insert, remove, replace)
    prev = current[:]
    #print(dp)
    return prev[len(word2)]
    #return help(len(word1) - 1, len(word2) - 1, word1, word2)

  • @kartik5073
    @kartik5073 7 หลายเดือนก่อน

    Thank you soo much bhaiya for your incredible DP playlist! Following it from the beginning has made me clear and confident enough to solve any DP problem. Your teaching is awesome and truly made a difference!"
    Undestood Understood Understood
    But i have 1 question here can't we just store the previous (i-1, j-1) into some temp variable and then optimise the problem to use only 1D array .
    I did the same and it worked on leetcode
    class Solution {
    public int minDistance(String word1, String word2) {
    int WIL word1.length(), W2L word2.length(); int[] dp = new int[W2L+1];
    for(int i = 0; i

  • @rushidesai2836
    @rushidesai2836 หลายเดือนก่อน

    This is a cream question guys. Understand it very clearly. If you understand you are probably good with DP on strings.

  • @everythingisconnected4005
    @everythingisconnected4005 หลายเดือนก่อน

    passing strings by referance took my program from being better than 5% solutions to being better than 60% solutions.
    and i was never using this i just kept passing strings of integers without referance.
    thanks!!

  • @yuvrajbais1103
    @yuvrajbais1103 ปีที่แล้ว

    excellent approach towards problem solving

  • @nalamanuraag802
    @nalamanuraag802 4 หลายเดือนก่อน

    Best DP Series ever!!!

  • @jyothiyadav2595
    @jyothiyadav2595 ปีที่แล้ว

    Understood , ur explanations 🤌🤌

  • @saurabhN1393
    @saurabhN1393 2 ปีที่แล้ว

    How to solve this question where only shifting of one character from back to front is allowed?
    The Levenshtein distance (or Edit distance) is a way of quantifying
    how different two strings are from one another by counting
    the minimum number of operations required to transform one string into the other.
    str1 = "ADCB"
    str2 = "ABCD"
    ADCB -> CADB (Move ‘C’ to the front)
    CADB -> BCAD (Move ‘B’ to the front)
    BCAD -> ABCD (Move ‘A’ to the front)
    Allowed to move one character to the front from the first string.

  • @dayashankarlakhotia4943
    @dayashankarlakhotia4943 ปีที่แล้ว

    Saw tusar Roy dp table understood everything in space optimization

  • @GunavardhanReddy-yq5pf
    @GunavardhanReddy-yq5pf ปีที่แล้ว

    Hey, striver after reading comments, some are able to solve on their own so i also gave it a try and hurrah! able to write the recursive code.

  • @tanishqagarg7582
    @tanishqagarg7582 ปีที่แล้ว

    IDK STRIVER IF YOU ARE READING THIS BUT I HATS OFF TO YU , I AM WATCHING DP AND AT 18.00 ;LITERALLY I CLAPPED AND SALUTED U . THIS IS HANDS DOWN THE BEST VIDEO EVER, PLEASE COME TO NORTHCAP UNIVERSITY PLEASEEEE

  • @SelvaArumugam-xq5mf
    @SelvaArumugam-xq5mf ปีที่แล้ว

    It was a cakeWalk bruh
    I remember from hearing from piyus agarwal on one of his videos that for an candidate master an amazon interview is a piece of cake walk and I wondered but now i Can see that the most difficult problems are easy now . Thank you bhaiyaa for everything......

  • @052_a_sourabhpathak5
    @052_a_sourabhpathak5 2 ปีที่แล้ว +1

    Started feeling confident now!!!!!!

  • @saharshbrnwl
    @saharshbrnwl 2 หลายเดือนก่อน +1

    We need video on Word Break problem.

  • @googleit2490
    @googleit2490 ปีที่แล้ว

    Done and dusted in the DP revision :)
    13 mins
    Nov'17, 2023 07:27 pm

  • @ranasauravsingh
    @ranasauravsingh 2 ปีที่แล้ว +1

    UNDERSTOOD... !!!
    Thanks striver for the video... :)

  • @punitkhandelwal6726
    @punitkhandelwal6726 2 ปีที่แล้ว +6

    US Best dp series🔥

  • @abhijeetmishra3804
    @abhijeetmishra3804 ปีที่แล้ว +1

    striver has got so less follower ...i dont get it....he is G.O.A.T

  • @dhruvdangi8923
    @dhruvdangi8923 3 หลายเดือนก่อน

    amazing analyzation sir

  • @saranghae3720
    @saranghae3720 2 ปีที่แล้ว +7

    bhaiya will u teach DP on graphs and Trees ? @TakeUForward