Leetcode Shortest Word Distance