Skip to content

Commit 2bb2280

Browse files
edit 127
1 parent f563b57 commit 2bb2280

File tree

1 file changed

+4
-6
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
* Given two words (beginWord and endWord),
1111
* and a dictionary's word list,
1212
* find the length of shortest transformation sequence from beginWord to endWord, such that:
13-
14-
Only one letter can be changed at a time.
15-
Each transformed word must exist in the word list. Note that beginWord is not a transformed word.
13+
* Only one letter can be changed at a time.
14+
* Each transformed word must exist in the word list. Note that beginWord is not a transformed word.
1615
1716
For example,
1817
@@ -21,8 +20,7 @@
2120
endWord = "cog"
2221
wordList = ["hot","dot","dog","lot","log","cog"]
2322
24-
As one shortest transformation is "hit" -> "hot" -> "dot" -> "dog" -> "cog",
25-
return its length 5.
23+
As one shortest transformation is "hit" -> "hot" -> "dot" -> "dog" -> "cog", return its length 5.
2624
2725
Note:
2826
@@ -31,8 +29,8 @@
3129
All words contain only lowercase alphabetic characters.
3230
You may assume no duplicates in the word list.
3331
You may assume beginWord and endWord are non-empty and are not the same.
34-
3532
*/
33+
3634
public class _127 {
3735

3836
/**reference: https://discuss.leetcode.com/topic/29303/two-end-bfs-in-java-31ms/16*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy