Time Limit Exceeded

  • 0

    Last executed input: "hot", "dog", ["hot","dog"]

    This input seems weird. From "hot" to "dog", the dict ["hot","dog"] don't generate a path. Is it a wrong input? Or should I return something else if there isn't a path (it could definitely happen)? The problem did not describe how to handle the no-path solution so I did not.

  • 1

    In this case, there is not any path, so you should return empty vector.

Log in to reply

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