Ad
  • Custom User Avatar

    You managed to make it readable. I like it. I commend your use of helper functions as well.

    Good job. 🙂

  • Custom User Avatar

    The test cases for submission are not nearly sufficient if this kind of answer is getting through.

  • Custom User Avatar

    This is defnitely true. I accidentally submitted my solution before I wrote any row logic at all and all the test cases passed. How do we get another test case added? What happens to users who have already sumbitted solutions which cannot pass that test case?

    Here's a test I added to mine to make sure that it does infact validate correctly:

    Test.assertEquals(validSolution([[5, 3, 4, 6, 7, 8, 9, 1, 2],
    [6, 7, 2, 1, 9, 5, 3, 4, 8],
    [1, 9, 8, 3, 4, 2, 5, 6, 7],
    [8, 5, 9, 7, 6, 1, 4, 2, 3],
    [4, 2, 6, 8, 5, 3, 7, 9, 1],
    [7, 1, 3, 9, 2, 4, 8, 5, 6],
    [9, 6, 1, 5, 3, 7, 2, 8, 4],
    [2, 8, 7, 4, 1, 9, 6, 3, 5],
    [5, 4, 3, 2, 8, 6, 1, 7, 9]]), false);