Ad
  • Custom User Avatar

    Yes, don't post here, it's unrelated, use that kata discussion. And if it is the 2kyu one (there are 2 katas with the same name):

    Or it should raise an error in cases of: invalid grid (not 9x9, cell with values not in the range 1~9); multiple solutions for the same puzzle or the puzzle is unsolvable

    So I guess you've found one solution but there is more than one.

  • Custom User Avatar

    Hard Sudoku Solver:

    Run into issue, where the kata says the offered sudoku puzzle is NOT solvable ... my code solves it ... and thus I can NOT pass?!

    I verified the puzzle and my solutions and can NOT find why it is rejected ... it only happens in 1 - 3 cases (RANDOM) per ATTEMPT.

    Any clues, suggestions?

    e.g:

    PUZZLE:
    [[3, 4, 7, 9, 0, 0, 0, 8, 0], [0, 1, 0, 8, 0, 0, 0, 5, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 5, 0, 0, 0, 0, 8], [0, 0, 0, 4, 0, 8, 0, 0, 0], [6, 0, 0, 0, 0, 3, 0, 0, 0], [0, 7, 0, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 5, 0, 3, 0], [0, 5, 0, 0, 0, 4, 2, 7, 9]]
    Solution:
    [[3, 4, 7, 9, 5, 1, 6, 8, 2], [2, 1, 9, 8, 3, 6, 7, 5, 4], [8, 6, 5, 2, 4, 7, 9, 1, 3], [7, 3, 4, 5, 6, 2, 1, 9, 8], [5, 9, 1, 4, 7, 8, 3, 2, 6], [6, 2, 8, 1, 9, 3, 5, 4, 7], [4, 7, 2, 3, 1, 9, 8, 6, 5], [9, 8, 6, 7, 2, 5, 4, 3, 1], [1, 5, 3, 6, 8, 4, 2, 7, 9]]