Search
⌘K
Leetcode 244. Shortest Word Distance II
Given a list of words, design a class that can answer repeated queries returning the minimum index distance between two given words; optimize for many queries by preprocessing each word’s positions and computing the smallest gap between their index lists efficiently.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid January, 2026
Senior
Mid January, 2026
Senior
2nd technical phone screen question
Mid January, 2026
Senior
The Question was worded as JobDesDistanceFinder which is very the same as Leetcode 244. Shortest Word Distance II.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.