Edit Distance (LeetCode 72) | Full step by step solution with thought process | Dynamic Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024

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

  • @luminraja09
    @luminraja09 2 หลายเดือนก่อน +4

    I went through lot of solution videos. Yours is so easy to understand . Keep up the great work :)

  • @NiteenChougula-fs9ij
    @NiteenChougula-fs9ij ปีที่แล้ว +1

    I've been searching for quality DSA lectures on TH-cam, and I'm delighted to have found excellent your channel.
    I'm eager to watch your videos and deepen my understanding of DSA.
    Thank you for clear and quality video.

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

      Thank you so much Niteen for being a member and supporting my channel. It really motivates me to keep working hard and bringing out the best. Remember that as a member, you do get priority reply to comments and queries. :)

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

    wowwww. Finallyyyy. I have understood this! Thanks a million!

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

    Thank you very much! The information provided was easy to comprehend.

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

    Amazing explanation 🙌

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

    Great explanation, Thanks!

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

    nikil, thank you so much my brother , a big fan from algeria

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

      happy to have you

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

    Thank you bhaiya you are explain very well like striver ।। Are you preparing for any company..

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

    Absolutely perfect

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

    I am new to dynamic programming! Good video! Keep making such videos. Although i did not understand it completely, I got a new idea on how to work on problems rather than going straight to brute force methods! Thanks

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

      What part did you face a problem with?? I can help

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

    How do you know, you have to attack this problem in this way at the first glance?

    • @nikoo28
      @nikoo28  8 หลายเดือนก่อน +2

      The more you practice, the more patterns you will start to observe. No shortcut my friend :)

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

    u explained xactly how its to be done
    not just filling table

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

    Can you please make video on word break and equal sum partition problem

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

      Those are in my list.

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

    Thank you!!!!!! Love your Teaching style

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

    What is the complexity of this solution?
    Is it O(n) + O(n) + O(n^2)?

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

      I explain it at 20:56

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

    can you tell me that while initialization of matrix, why are we traversing from the 1st index and not 0?

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

      the first row and column will all be zeroes

  • @AyushSharma-tj1kp
    @AyushSharma-tj1kp หลายเดือนก่อน

    why did we compare string at i-1 and j-1 ??

    • @avengersshorts5949
      @avengersshorts5949 17 วันที่ผ่านมา +1

      To check whether they are same characters or not?

    • @avengersshorts5949
      @avengersshorts5949 17 วันที่ผ่านมา +1

      19:59 In the first condition both a are equal at i=1 and j=1 so the string index starts from 0 the first character in word1 is a at index 0 so we need to reduce the i and j by minus 1
      Hope you understand

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

    Can someone let me know why do we initialize dp with length (m+1, n+1), why we have to consider empty char at begging of the appraoch?

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

      Because empty character is also a valid test case

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

      If you have an input like this
      str1 = “abcd”
      str2 = “”
      This is a perfectly valid test case and it’s answer will be 4.

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

      ​@@nikoo28o

  • @k.k.harjeeth5422
    @k.k.harjeeth5422 11 หลายเดือนก่อน

    Lucid !

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

    It was great ! Thanks !

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

    waiting for more videos on strings