Back to QuestionsPractice with This Question
Shortest Word Distance
147.3K views•Asked at Spotify•
Easy
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
Practice answering orally or with text to get instant AI feedback.