Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3888a18

Browse files
refactor 243
1 parent4795613 commit3888a18

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
packagecom.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
publicclass_243 {
174
publicstaticclassSolution1 {
185
publicintshortestDistance(String[]words,Stringword1,Stringword2) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp