Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 290 Bytes

File metadata and controls

3 lines (2 loc) · 290 Bytes

Question

You have a large text file containing words. Given any two words, find the shortest distance (in terms of number of words) between them in the file. If the operation will be repeated many times for the same file (but different pairs of words), can you optimize your solution?