Wrong test case


  • 0
    T

    I have a stuck with a test case

    "hit"
    "cog"
    ["hot","dot","dog","lot","log"]

    My output is

    [["hit","hot","dot","dog","cog"],["hit","hot","lot","log","cog"],["hit","hot","dot","dog","cog"],["hit","hot","lot","log","cog"]]

    I believe it should be correct. But the expect result is empty.


  • 0
    Z

    The description says: Each transformed word must exist in the word list. Note that beginWord is not a transformed word. Therefore, the end word, which is "cog", should also be in the word list.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.