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
I went through lot of solution videos. Yours is so easy to understand . Keep up the great work :)
wowwww. Finallyyyy. I have understood this! Thanks a million!
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.
Thank you very much! The information provided was easy to comprehend.
Great explanation, Thanks!
Amazing explanation 🙌
Absolutely perfect
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.
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. :)
nikil, thank you so much my brother , a big fan from algeria
happy to have you
Thank you!!!!!! Love your Teaching style
Thank you bhaiya you are explain very well like striver ।। Are you preparing for any company..
It was great ! Thanks !
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
What part did you face a problem with?? I can help
can you tell me that while initialization of matrix, why are we traversing from the 1st index and not 0?
the first row and column will all be zeroes
Can you please make video on word break and equal sum partition problem
Those are in my list.
u explained xactly how its to be done
not just filling table
How do you know, you have to attack this problem in this way at the first glance?
The more you practice, the more patterns you will start to observe. No shortcut my friend :)
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?
Because empty character is also a valid test case
If you have an input like this
str1 = “abcd”
str2 = “”
This is a perfectly valid test case and it’s answer will be 4.
@@nikoo28o
Lucid !
waiting for more videos on strings
What is the complexity of this solution?
Is it O(n) + O(n) + O(n^2)?
I explain it at 20:56