Levenstein Distance
A text string is given. You can perform the following operations with it:
1. Replace one character of the string with another character.
2. Delete one arbitrary character.
3. Insert an arbitrary character in an arbitrary place of the string.
For example, using the first operation from the string "JUICE", you can get the string "SUK", using the second operation - the string "OK", using the third operation - the string "DRAIN.
The minimum number of such operations by which one can get another from one line is called the editing cost or the Levenshtein distance.
Determine the Levenshtein distance for two given rows.
The program receives two lines for input, each of which does not exceed 1000 characters in length, the lines consist only of uppercase Latin letters.
It is required to output one number – the Levenshtein distance for these rows.
ABCDEFGH ACDEXGIH
3