Back to Question
Shortest Word Distance
Question Explain
Given an array of strings `wordsDict` and two words `word1` and `word2`, return the shortest distance between the two words in the list.
Start Trying This Question Simulation
Click "Start Speaking" and answer the question naturally.