Redirecting to
NADOS

Edit Distance

1. You are given two strings s1 and s2.
2. You have to find the minimum number of operations needed to convert s1 to s2.
Operations allowed are -
Insert - You can insert any character in s1.
Remove - You can remove any character in s1.
Replace - You can replace any character in s1 with any other character.
Input Format
Two strings s1 and s2
Output Format
Check the sample output and question video.
Question Video
Constraints
1 <= length of s1,s2 <= 100
Sample Input
pepperatcoding
pepcoding
Sample Output
5


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name