Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0921099

Browse files
refactor 244
1 parent 3888a18 commit 0921099

File tree

1 file changed

+0
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-15
lines changed

src/main/java/com/fishercoder/solutions/_244.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,6 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
/**
9-
* 244. Shortest Word Distance II
10-
*
11-
* This is a follow up of Shortest Word Distance. The only difference is now you are given the list of words and your method will be called repeatedly many times with different parameters. How would you optimize it?
12-
* Design a class which receives a list of words in the constructor, and implements a method that takes two words word1 and word2 and return the shortest distance between these two words in the list.
13-
14-
For example,
15-
Assume that words = ["practice", "makes", "perfect", "coding", "makes"].
16-
17-
Given word1 = “coding”, word2 = “practice”, return 3.
18-
Given word1 = "makes", word2 = "coding", return 1.
19-
20-
Note:
21-
You may assume that word1 does not equal to word2, and word1 and word2 are both in the list.
22-
*/
238
public class _244 {
249
public static class Solution1 {
2510
class WordDistance {

0 commit comments

Comments
 (0)