Search⌘ K
AI Features

Shortest Word Distance II

Shortest Word Distance II asks you to design a class that stores an array of words and efficiently returns the smallest positional distance between any two different target words.

Statement

Design a data structure that takes in an array of strings and efficiently computes the shortest distance between ...