Pregunta de entrevista de Amazon

write an algorithm to calculate the edit distance between two strings