About This Pattern
Master the Hash Map / Design pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.
Medium (1)
Shortest Word Distance II
Design a data structure that finds the shortest distance between two words efficiently with multiple queries.
Key Signals:
PreprocessingMultiple queriesStore indices