3 ms·
Raical has a Levenshtein distance of 2 from racial. Swapping two characters is a deletion + insertion. You'd need to use Damerau-Levenshtein distance for transp
by x3n0ph3n3 10y ago
Raical has a Levenshtein distance of 2 from racial. Swapping two characters is a deletion + insertion. You'd need to use Damerau-Levenshtein distance for transposition to count as 1 operation.
https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_di...
- mrkgnao 10y agoThank you for correcting me, now I know! :)