← 返回 bytedance 的题目列表Word Ladder II And Linked List Cycle II
类型:online_judge
You are given a dictionary wordList and two strings, beginWord and endWord. Find all shortest transformation sequences from beginWord to endWord. Each transformation changes only one letter and the intermediate words must be in the dictionary. Another problem is given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Example
Input
hit cog ["hot","dot","dog","lot","log","cog"]