Skip to content

Commit 3888a18

Browse files
refactor 243
1 parent 4795613 commit 3888a18

File tree

1 file changed

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

1 file changed

+0
-13
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 243. Shortest Word Distance
5-
*
6-
* Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list.
7-
8-
For example,
9-
Assume that words = ["practice", "makes", "perfect", "coding", "makes"].
10-
11-
Given word1 = “coding”, word2 = “practice”, return 3.
12-
Given word1 = "makes", word2 = "coding", return 1.
13-
14-
Note:
15-
You may assume that word1 does not equal to word2, and word1 and word2 are both in the list.*/
163
public class _243 {
174
public static class Solution1 {
185
public int shortestDistance(String[] words, String word1, String word2) {

0 commit comments

Comments
 (0)