anyone can help me figure out why?


  • 0
    E

    Does anyone knows why the following case can not pass the test:

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

    my Output: is 5, which is hit-hot-lot-log-cog

    but the expected result is supposed to be 0.

    I am a little confused.


  • 0
    S

    the end word needs to be in the word list, cog is not in the list so it needs to return 0


Log in to reply
 

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