• Hi.
    Great Kata, thanks !
    Do we need to use numpy or is it not necessary ?

  • print to the console. If you're using python, use print(..., flush=True)

  • Yes, thats my fault, didn't notice at all :( Thank you for notice this, I think I should put some full-validation tests for my calculated solutions

  • Your solution 1 isn't valid, see the middle row:

    [5, 6, 8, 7, 9, 4, 2, 7, 3], there are 2 7s and no 1

  • "The solution only need to give one valid solution" - which one?
    For example, problem case from "Fixed tests":

    [[0, 8, 0, 0, 5, 0, 0, 2, 0],
    [6, 0, 0, 0, 0, 7, 0, 0, 5],
    [0, 0, 0, 2, 0, 9, 0, 0, 0],
    [0, 1, 7, 0, 0, 0, 9, 0, 0],
    [5, 0, 0, 0, 0, 0, 0, 0, 3],
    [0, 0, 9, 0, 0, 0, 8, 6, 0],
    [0, 0, 0, 8, 0, 3, 0, 0, 0],
    [9, 0, 0, 6, 0, 0, 0, 0, 2],
    [0, 5, 0, 0, 1, 0, 0, 3, 0]]

    My solutions:

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

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

    Each solution seems work, 487 tests passed with strategy "return first calculated solution". Ironically, all tests "Now testing multiple solution sudoku!" were passed but fails on fixed and random tests. How to decide which one should be returned to pass?

  • cool! did not remember to add +1, makes sense

  • How to check how many tests were passed before Time Out?

  • Thanks buddy.

  • 100 random tests and 5 assertions per test. I let you do the maths.

  • Passed: 304 Failed: 0 Exit Code: 1

    Am I close?

  • Tried lots of 'evil' task and everything going well on home computer with time less than 100 ms... but when tried to Attempt it's steady giving time out?

  • Test case are run sequentially therefore if the code produced include a global variable, you want to make sure to re-initialize each global variable at the beginning of the solve method.

    I hope this clue help you.

  • The examiner appears to keep cash between tests
    I fail at tables that my code resolves well

  • As most of kata there is hidden testcase so trying to get away by hardcoding each case isn't the goal of this kata.
    The path you're going right now just continue to expose vulnerability.

    If you want to hardcode every sound I suggest you listen to this song : Ylvis - The Fox (What Does The Fox Say?) https://www.youtube.com/watch?v=jofNR_WkoCE

    Happy new year!

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

  • Loading more items...