Levenshtein distance
This implementation is very inefficient because it recomputes the Levenshtein distance of the same substrings many times.