Pregunta de entrevista de Amazon

Questions about computing the distance between words