LinkedIn Interview Question

Data structures and algorithms. Shortest distance btw words in an array