Amazon interview question

Questions about computing the distance between words