欢迎24级新生

2193. Word Ladder II

Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: • Only one letter can be changed at a time • Each intermediate word must exist in the dictionary For example, Given: start = "hit" end = "cog" dict = ["hot","dot","dog","lot","log"] Return [ ["hit","hot","dot","dog","cog"], ["hit","hot","lot","log","cog"] ] Note: • All words have the same length. • All words contain only lowercase alphabetic characters

输入

输出

登录以提交代码。
单点时限 1 秒
内存限制 128 MB
提交 0
通过 0