Ad
  • Default User Avatar

    Not a valid Sudoku answer. Each 3x3 section has to have the digits 1-9.

    Top left 3x3 section should contain 1-9:

    5, 3, 1
    6, 2, 3
    1, 9, 1

    It contains 1 three times, 3 twice, and it's missing 4, 7, and 8.

    Top middle contains 7 twice and misses 8; top right misses 1 and 3 and has 4 and 8 twice; etc.

  • Default User Avatar

    I ran into a problem. The test puzzle isn't deterministic.

    My solver found this solution from your test case:

    [ 5, 3, 1, 2, 7, 6, 4, 9, 8 ]
    [ 6, 2, 3, 1, 9, 5, 8, 4, 7 ]
    [ 1, 9, 8, 3, 4, 7, 5, 6, 2 ]
    [ 8, 1, 2, 7, 6, 4, 9, 5, 3 ]
    [ 4, 7, 9, 8, 5, 3, 6, 2, 1 ]
    [ 7, 4, 5, 9, 2, 8, 3, 1, 6 ]
    [ 9, 6, 7, 5, 3, 1, 2, 8, 4 ]
    [ 2, 8, 6, 4, 1, 9, 7, 3, 5 ]
    [ 3, 5, 4, 6, 8, 2, 1, 7, 9 ];

    It's a valid Sudoku answer, but it doesn't work when validated against the specific result you're looking for. Similar problems occur when submitting the solution and comparing against the other test cases. Validation should really be testing for any valid solution rather than a specific solution.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    (isNaN(oct[i])) { return false; }

    This incorrectly trims the string. e.g: "12 " would return true. You need another way to handle the spaces.

  • Default User Avatar

    Also add ))(( as a test case as several solutions incorrectly sum up the number without validating position.