LearnPy Hub
← Arena
AdvancedRating 1600

Edit Distance

Print the minimum number of single-character inserts, deletes or replacements to turn the first word into the second.

Input

Two lines.

Output

A number.

Sample 1

Input
horse
ros
Output
3

Sample 2

Input
intention
execution
Output
5
solution.py
Output appears here
Edit Distance · Python Arena problem · LearnPy Hub