Search⌘ K
AI Features

Shortest Word Distance II

Shortest Word Distance II builds a word-distance service from an array of strings, then returns the smallest index gap between any two requested, different words.

Statement

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