Test case checking 2


  • 0
    B

    I think my output is correct.

    Input:
    [[0,0,0,0,0],[1,1,0,0,1],[0,0,0,0,0],[0,1,0,0,1],[0,1,0,0,0]]
    [4,3]
    [3,0]
    Output:
    "luld"
    Expected:
    "impossible"


  • 0

    "The ball can go through empty spaces by rolling up (u), down (d), left (l) or right (r), but it won't stop rolling until hitting a wall. When the ball stops, it could choose the next direction."

    So in the second example, the ball won't stop until it rolls to row 0.


  • 0
    B

    @fallcreek ok, got it now, thanks.


Log in to reply
 

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