Question: Write a function that takes in two strings and returns the minimum number of operations required to convert the first string into the second string.
Write a function that takes in two strings and returns the minimum number of operations required to convert the first string into the second string. The available operations are: insert a character, delete a character, and replace a character. Each operation counts as one unit. For example, if the input strings are "kitten" and "sitting", the function should return 3, because it is possible to convert "kitten" to "sitting" by replacing "k" with "s", replacing "e" with "i", and inserting a "g" at the end.
Step by Step Solution
3.39 Rating (158 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below def mineditdistances1 s2 m lens1 n lens... View full answer
Get step-by-step solutions from verified subject matter experts
