Why this is a valid sudoku? OJ bug?


  • 0
    Z

    Input: ["..5.....6","....14...",".........",".....92..","5....2...",".......3.","...54....","3.....42.","...27.6.."]
    Output: false
    Expected: true

    OJ seems to expect this is a valid sudoku.
    But a[6][4]=4; a[7][6]=4; and these two belongs to one sub 3*3 grid.


  • 0
    B

    Coordinates (6, 4) is in the bottom middle square while (7, 6) is in the bottom right square. So, there's no conflict and the grid is valid.


Log in to reply
 

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