Shortest Word Distance
CodingPhoneSoftware EngineerReported Mar, 2026
Company question banks are included with the Insider plan.
You are given an array of strings wordsDict and two different strings word1 and word2 that both appear in the array.
Return the minimum distance between any occurrence of word1 and any...