← 返回 amazon 的题目列表Word Ladder II
类型:online_judge
amazon
Given two words, beginWord and endWord, and a word list, find all the shortest transformation sequences from beginWord to endWord. Each transformation must change exactly one letter and all intermediate words must be in the word list. Note: Find all shortest transformation paths.
Example
Input
hit cog
dot dog cog