LeetCode: Word Ladder wrong test case?


  • 0
    C

    This is a little strange to me. Maybe I have been too tired to be clear. I have found a test case for word ladder "a", "c", with dict {"a", "b", "c"}

    The expected answer is 2 for this. But how could this be? I just change the letter a to c by 1 step and it's done. Am I wrong?


  • 0

    Shortest sequence is "a" -> "c" which has length 2.


  • 0
    C

    Yep. This is correct. I misunderstand that question at first.


Log in to reply
 

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