Leetcode answer is wrong...


  • 0
    H

    for the following input,
    [0,0,0,0],[0,1,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]
    my answer is 8;
    but leetcode expects 7.

    I believe mine is correct...


  • 2
    S

    This test case looks like below:

    0 0 0 0
    0 1 0 0
    0 0 0 0 
    0 0 1 0
    0 0 0 0
    

    How do you believe that? I can only count 7 different path.
    FYI, as 'Follow Up' question of Unique Path, which it has mentioned in description, the robot can still only move either down or right at any point in time.


Log in to reply
 

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