Ad
  • Custom User Avatar

    Is breaking the top solutions wrong if the top solutions don't correctly check for a valid sudoku?

  • Custom User Avatar

    @pythor77 In order for someone to answer your question you will have to show exactly what you put into the test case.

    e.g. if your test case is:

      [[[1, 2, 3, 4, 5, 6, 7, 8, 9],
        [2, 3, 4, 5, 6, 7, 8, 9, 1],
        [3, 4, 5, 6, 7, 8, 9, 1, 2],
        [4, 5, 6, 7, 8, 9, 1, 2, 3],
        [5, 6, 7, 8, 9, 1, 2, 3, 4],
        [6, 7, 8, 9, 1, 2, 3, 4, 5],
        [7, 8, 9, 1, 2, 3, 4, 5, 6],
        [8, 9, 1, 2, 3, 4, 5, 6, 7],
        [9, 1, 2, 3, 4, 5, 6, 7, 8]], "Try again!"]
    

    then of course it will pass. You are not providing enough info to tell why you are not getting the result you expect to get.

  • Custom User Avatar

    It's worse than that. It also fails on this one:

    (def board
      [[1 1 1 1 1 1 1 1 1]
       [1 1 1 1 1 1 1 1 1]
       [4 4 4 4 4 4 4 4 4]
       [4 4 4 4 4 4 4 4 4]
       [5 5 5 5 5 5 5 5 5]
       [6 6 6 6 6 6 6 6 6]
       [7 7 7 7 7 7 7 7 7]
       [8 8 8 8 8 8 8 8 8]
       [9 9 9 9 9 9 9 9 9]])