Wordladder II lacks test cases

  • 0

    I wrote some wrong code and it got accepted, but the code fails to take care of the following new case:

    dict = ["123", "103", "104","105","106","107","108", "133", "143", "153"]
    start = "123", end = "108"

    basically the idea is that in a earlier section of the final path, there is also a longer detour : from 123 we go to 103, but you can also go 123-->133->143->153->103

    my code only prints out one path, but u can have at least 2 paths.

  • 0

    I don't get your question. Didn't the description say the 'shortest transformation sequence(s)'?
    123-->133->143->153->103 is not one of the shortest(s).

  • 0

    ah.... my bad, thanks for pointing that out

Log in to reply

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