[Q18.5]find min distance between two words