Problem 244 · Medium

Shortest Word Distance II

Design a class that can find shortest distance between two words efficiently.

Open the interactive visualisation