Why the expected answer is 0 in this case :

  • 0

    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

    As stated in the problem description:

    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.