Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for String Conversion by antauren
def Ld(a, b):
'''Levenshtein distance'''
if not a: return len(b)
if not b: return len(a)
return min(Ld(a[1:], b[1:])+(a[0] != b[0]), Ld(a[1:], b)+1, Ld(a, b[1:])+1)
steps_to_convert = Ld
May 6, 2018