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

  Рет қаралды 10,971

Nikhil Lohia

Nikhil Lohia

Күн бұрын

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 Ай бұрын
I went through lot of solution videos. Yours is so easy to understand . Keep up the great work :)
@juniorferreira1358
@juniorferreira1358 11 ай бұрын
Thank you very much! The information provided was easy to comprehend.
@jamjam3448
@jamjam3448 2 ай бұрын
wowwww. Finallyyyy. I have understood this! Thanks a million!
@ahmedtremo
@ahmedtremo 6 ай бұрын
Great explanation, Thanks!
@jatinkumar4410
@jatinkumar4410 3 ай бұрын
Amazing explanation 🙌
@samridhshubham8109
@samridhshubham8109 11 ай бұрын
Absolutely perfect
@NiteenChougula-fs9ij
@NiteenChougula-fs9ij 11 ай бұрын
I've been searching for quality DSA lectures on KZbin, 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 ай бұрын
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 10 ай бұрын
nikil, thank you so much my brother , a big fan from algeria
@nikoo28
@nikoo28 9 ай бұрын
happy to have you
@AyushSharma-tj1kp
@AyushSharma-tj1kp 13 күн бұрын
why did we compare string at i-1 and j-1 ??
@KaPaTeJIb6a6o4ek
@KaPaTeJIb6a6o4ek 4 ай бұрын
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
@shaistakhan9048
@shaistakhan9048 Жыл бұрын
Thank you!!!!!! Love your Teaching style
@deepakkumar13204
@deepakkumar13204 8 ай бұрын
Thank you bhaiya you are explain very well like striver ।। Are you preparing for any company..
@aalialokhandwala8950
@aalialokhandwala8950 10 ай бұрын
can you tell me that while initialization of matrix, why are we traversing from the 1st index and not 0?
@nikoo28
@nikoo28 9 ай бұрын
the first row and column will all be zeroes
@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
@joyantamitra8186
@joyantamitra8186 7 ай бұрын
How do you know, you have to attack this problem in this way at the first glance?
@nikoo28
@nikoo28 7 ай бұрын
The more you practice, the more patterns you will start to observe. No shortcut my friend :)
@sobitregmi31
@sobitregmi31 Жыл бұрын
Can you please make video on word break and equal sum partition problem
@nikoo28
@nikoo28 Жыл бұрын
Those are in my list.
@itjustworks4824
@itjustworks4824 3 ай бұрын
u explained xactly how its to be done not just filling table
@k.k.harjeeth5422
@k.k.harjeeth5422 10 ай бұрын
Lucid !
@RomanHaivaronski
@RomanHaivaronski 10 ай бұрын
What is the complexity of this solution? Is it O(n) + O(n) + O(n^2)?
@nikoo28
@nikoo28 9 ай бұрын
I explain it at 20:56
@shaistakhan9048
@shaistakhan9048 Жыл бұрын
waiting for more videos on strings
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 78 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 73 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 8 МЛН
Edit Distance - Dynamic Programming - Leetcode 72 - Python
21:00
Minimum edit distance | Dynamic programming | Backtracking
28:52
Max Consecutive Ones (LeetCode 1004) | Full Solution w/ animations
14:41
Software Engineering Job Interview - Full Mock Interview
1:14:29
freeCodeCamp.org
Рет қаралды 1,3 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 78 МЛН