Edit Distance

easy
1. You will be given 2 words: word1 and word2 2. Given that in each move you can only perform the one of these 3 operations: a) Insert a character b) Delete a character c) Replace a character 3. Find and return minimum moves needed to modify word1 to word2 4. Input and output is handled for you 5. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you

Output Format

Output is handled for you

Constraints

1<=n<=50

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
abcc
aaaddc
Output
4
Previous
Distinct Transformations
Next
Frog Jump

Related Questions