Ad
  • Custom User Avatar

    I think some others have noted this here, but for Javascript there is a test case of [ [true] ] which is dissallowed. Booleans are typically considered a special case of number, and behave as such in JS (i.e., 5 + true == 6). It seems that [ [ true ] ] should be true as a best practice as the trivial sudoku of 1x1 can only have one value 1 which is best represented by a boolean.

  • Custom User Avatar

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

  • Custom User Avatar

    Python: the issue noted by @Matyt 7 years ago, that bool is a subclass of int and yet considered invalid, is still present.

    The following are all True in Python:

    False == 0
    isinstance(False, int)
    True in [1, 2, 3]
    

    Requiring the validation to fail on boolean values breaks the usual assumptions on these things (e.g. that a subclass can be used wherever the parent class can). At the very least, the fact that bools are disallowed should be explicitly noted in the description.

  • Custom User Avatar

    Python 3.11:

    I passed the tests by only checking each of the little squares in the sudoku and ignoring rows + columns, does having an invalid square implicitly make an invalid row / column?

    Thanks

  • Custom User Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/171.
    Please join the discussion to help us identify duplicate kata and retire them.

    This kata was decided to be kept and fixed. A new discussion has been started to collect potential ideas of fixing it: https://github.com/codewars/content-issues/issues/172 .

  • Custom User Avatar

    I have a AttributeError: 'bool' object has no attribute 'is_valid', my solution is correct, but it gives an error. Im used a DEF() and not CLASS(), help me please

  • Custom User Avatar
  • Custom User Avatar

    There is no test for rule 2 and 3!

    I was able to sumbit without having these validations in my solution...

    Untested rules:
    Rows may only contain integers: 1..N (N included)
    Columns may only contain integers: 1..N (N included)

  • Custom User Avatar

    there is no test that checks for uniqueness of numbers in a small square

  • Custom User Avatar

    Insufficient tests. Sudoku rules checked only in squares but not in rows or columns. Instructions incomplete as well.

  • Custom User Avatar

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

  • Custom User Avatar

    VB Translation ready for review.

  • Custom User Avatar

    'Little squares' (3x3 in example above) may also only contain integers...

    It took me 15 Minutes to work out what was ment with "little squares", due to my solution not passing with exactly that error. I mean. It's a made-up term anyway it seems. Also, obviously, i don't play Sudoku.

    Shouldn't be too much of hassle to show what exactly a "little square" is supposed to be in the instructions i guess. :)

  • Custom User Avatar

    It would be great if the instructions of the question were explained clearly for the people who don't know what Sudoku is. For example, instead of saying that "Rows may only contain integers", I recommend that the uniqueness of the integers must be mentioned in that sentence clearly.

  • Custom User Avatar

    Hi, there!
    having this error:
    tests/Fixture.cs(23,32): error CS7036: There is no argument given that corresponds to the required formal parameter 'sudoku' of 'Sudoku.IsValid(int[][])'

    in C# the initial code looks like this:

    class Sudoku
    {
    public Sudoku(int[][] sudokuData)
    {
    //Constructor here
    }

    public bool IsValid()
    {
    throw new NotImplementedException();
    }
    }

    I had implemented IsValid() function but what I need to do in constructor????
    pass a sudokuData to IsValid? any ideas?

  • Loading more items...