Why this case is false? ["ab","cd"], "abcd"

  • 1

    I may not understand the problem very well.

  • 0

    The board looks like


    For word abcd, we have to start from top left a ,then go right to b. But c is not the neighbor of b, which means this word we have no idea to search out by walking on this board.

    So the answer should be False.

  • 0

    Actually I had the same error. Read it again. It is looking for "acdb":

    Submission Result: Wrong Answer

    Input: ["ab","cd"], "acdb"
    Output: false
    Expected: true

Log in to reply

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