#t416. 编辑距离
编辑距离
Edit Distance
Problem Description
Let and be two strings. We want to transform string into string using the minimum number of character operations. There are three kinds of character operations:
- delete a character;
- insert a character;
- change one character into another.
Both and contain only lowercase letters.
Input Format
The first line is the string ; the second line is the string . Both strings have length less than .
Output Format
A single positive integer: the minimum number of character operations.
Sample Input
sfdqxbw
gfdgw
Sample Output
4
Hint
For 100% of the test data, .