Why the expected answer is 0 in this case :


  • 0
    S

    Input: "hot", "dog", ["hot","dog"]

    Output: -1

    Expected: 0

    Output should be -1, right ?

    As from "hot" by changing you can't go anywhere in dictionary!


  • 0
    G

    As stated in the problem description:

    Note:
    Return 0 if there is no such transformation sequence.
    

Log in to reply
 

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