#21 Levenshtein algoritm for calculating edit distance