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

Поделиться
HTML-код
  • Опубликовано: 2 июл 2024
  • Actual problem on LeetCode: leetcode.com/problems/edit-di...
    Chapters:
    00:00 - Intro
    00:48 - Problem Statement and Description
    03:23 - What are operations?
    04:57 - Brute Force Won’t work
    07:07 - Dynamic Programming with Memoization
    19:12 - Dry-run of Code
    21:13 - Final Thoughts
    📚 Links to topics I talk about in the video:
    LeetCode Problems: • Leetcode Solutions
    Other String Problems: • Strings
    Brute Force: • Brute Force algorithms...
    Dynamic Programming: • Dynamic Programming ea...
    📘 A text based explanation is available at: studyalgorithms.com
    Code on Github: github.com/nikoo28/java-solut...
    Test-cases on Github: github.com/nikoo28/java-solut...
    📖 Reference Books:
    Starting Learn to Code: amzn.to/36pU0JO
    Favorite book to understand algorithms: amzn.to/39w3YLS
    Favorite book for data structures: amzn.to/3oAVBTk
    Get started for interview preparation: amzn.to/39ysbkJ
    🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
    🎥 My Recording Gear:
    Recording Light: amzn.to/3pAqh8O
    Microphone: amzn.to/2MCX7qU
    Recording Camera: amzn.to/3alg9Ky
    Tablet to sketch and draw: amzn.to/3pM6Bi4
    Surface Pen: amzn.to/3pv6tTs
    Laptop to edit videos: amzn.to/2LYpMqn
    💻 Get Social 💻
    Follow on Facebook at: / studyalgos
    Follow on Twitter at: / studyalgorithms
    Follow on Tumblr at: / studyalgos
    Subscribe to RSS feeds: studyalgorithms.com/feed/
    Join fan mail: eepurl.com/g9Dadv
    #leetcode #programming #interview

Комментарии • 31

  • @luminraja09
    @luminraja09 Месяц назад +3

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

  • @jamjam3448
    @jamjam3448 2 месяца назад

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

  • @rajeshpaithari7320
    @rajeshpaithari7320 3 месяца назад

    I'm a beginner and I watched atleast 6 videos on the same problem and couldn't understand them. Finally I found this!! Thank you.

  • @juniorferreira1358
    @juniorferreira1358 10 месяцев назад

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

  • @ahmedtremo
    @ahmedtremo 5 месяцев назад +1

    Great explanation, Thanks!

  • @jatinkumar4410
    @jatinkumar4410 2 месяца назад +1

    Amazing explanation 🙌

  • @samridhshubham8109
    @samridhshubham8109 10 месяцев назад +1

    Absolutely perfect

  • @NiteenChougula-fs9ij
    @NiteenChougula-fs9ij 11 месяцев назад +1

    I've been searching for quality DSA lectures on RUclips, 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  11 месяцев назад +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. :)

  • @xxxmin0uxxx858
    @xxxmin0uxxx858 9 месяцев назад

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

    • @nikoo28
      @nikoo28  8 месяцев назад

      happy to have you

  • @shaistakhan9048
    @shaistakhan9048 11 месяцев назад

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

  • @deepakkumar13204
    @deepakkumar13204 7 месяцев назад +1

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

  • @KaPaTeJIb6a6o4ek
    @KaPaTeJIb6a6o4ek 3 месяца назад

    It was great ! Thanks !

  • @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

  • @aalialokhandwala8950
    @aalialokhandwala8950 9 месяцев назад

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

    • @nikoo28
      @nikoo28  8 месяцев назад

      the first row and column will all be zeroes

  • @sobitregmi31
    @sobitregmi31 11 месяцев назад

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

    • @nikoo28
      @nikoo28  11 месяцев назад

      Those are in my list.

  • @itjustworks4824
    @itjustworks4824 2 месяца назад

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

  • @joyantamitra8186
    @joyantamitra8186 6 месяцев назад +1

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

    • @nikoo28
      @nikoo28  6 месяцев назад +1

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

  • @himajap2446
    @himajap2446 11 месяцев назад

    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  11 месяцев назад

      Because empty character is also a valid test case

    • @nikoo28
      @nikoo28  11 месяцев назад

      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 11 месяцев назад

      ​@@nikoo28o

  • @k.k.harjeeth5422
    @k.k.harjeeth5422 9 месяцев назад

    Lucid !

  • @shaistakhan9048
    @shaistakhan9048 11 месяцев назад +1

    waiting for more videos on strings

  • @RomanHaivaronski
    @RomanHaivaronski 9 месяцев назад

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

    • @nikoo28
      @nikoo28  8 месяцев назад

      I explain it at 20:56