Anduril interview question

Find minimum distance between two words in a list