~/algor $ cat problems/dp-tahrirlash-masofasi
Edit distance
Medium
1000 ms
128 MB
60%
Two strings $s$ and $t$ are given. In one operation you may insert one letter anywhere into $s$, delete one letter from it, or replace one of its letters with another. What is the smallest number of operations needed to turn $s$ into $t$?
Input
The first line contains the string $s$, the second line contains the string $t$.
Output
One integer — the smallest number of operations.
Note
$1 \le |s|, |t| \le 1000$
the strings consist only of lowercase Latin letters (a–z)
Examples
Input #1
kitob kitoblar
Output #1
3
Input #2
olma olma
Output #2
0