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

Commitad94913

Browse files
refactor 127
1 parent9a9db67 commitad94913

File tree

1 file changed

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

1 file changed

+0
-26
lines changed

‎src/main/java/com/fishercoder/solutions/_127.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,6 @@
44
importjava.util.List;
55
importjava.util.Set;
66

7-
/**
8-
* 127. Word Ladder
9-
*
10-
* Given two words (beginWord and endWord), and a dictionary's word list,
11-
* find the length of shortest transformation sequence from beginWord to endWord, such that:
12-
* Only one letter can be changed at a time.
13-
* Each transformed word must exist in the word list. Note that beginWord is not a transformed word.
14-
15-
For example,
16-
17-
Given:
18-
beginWord = "hit"
19-
endWord = "cog"
20-
wordList = ["hot","dot","dog","lot","log","cog"]
21-
22-
As one shortest transformation is "hit" -> "hot" -> "dot" -> "dog" -> "cog", return its length 5.
23-
24-
Note:
25-
26-
Return 0 if there is no such transformation sequence.
27-
All words have the same length.
28-
All words contain only lowercase alphabetic characters.
29-
You may assume no duplicates in the word list.
30-
You may assume beginWord and endWord are non-empty and are not the same.
31-
*/
32-
337
publicclass_127 {
348
publicstaticclassSolution1 {
359

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp