Ad
  • Custom User Avatar

    It can also be a 0 :'The cells of the sudoku board may also contain 0's, which will represent empty cells.'

  • Custom User Avatar
  • Custom User Avatar

    you can print the input board and check out what you are missing out;)

  • Custom User Avatar

    My code passes 5/6 checks. True should equal False. Is it possible to see how the Sudoku he decides is not correct?

  • Custom User Avatar

    I think the description needs a small fix, it says "...and every cell only contains integers from 0 to 9", but the integers are actually from 1 to 9.

  • Custom User Avatar

    No biggie, fixed my solution, now that I know that that kind of thing can happen when rendering test results I'll know how to interpret the output next time and won't waste time on the wrong thing.

  • Custom User Avatar

    I did notice a bit unusual display of test cases, but I did not see it's that confusing. It's probably of no help for you anymore, but I rased appropriate issue above.

  • Custom User Avatar

    In Scala, test cases have multiline names, and this causes confusing behavior. Part of the name (first line) is used as header of collapsible test case section, and remaining lines appear in a way similar to stdout log output. This can (and does, see post below) cause confusion and problems with correct interpretation of log messages.

  • Custom User Avatar

    Hey

    I found the error, just the test output was a bit misleading. The multiline test name was rendered a bit weirdly and the copy of the test input was missing first row, which lead to me testing with ilformed matrix which caused the test to work locally, but invalidating the input for different reason. The real reason was wrongly formed sub matrices.

    Also the log of the test included stuff from the following test.

  • Custom User Avatar

    I just solved the kata in Scala and encountered no problems. I am going to close the issue here as not a kata bug.
    If you want us to take a look at your solution, post it here (remember about markdown code formatting and spoiler flag) so we could take a look at it.

    Interleaved tests output can be a sign that test runner executes tests in parallel, but AFAIK there were some countermeasures taken against such behavior. I will verify if it's indeed the case. This can also cause some problems if your solution has some state, but you said it does not.

  • Custom User Avatar

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

  • Custom User Avatar

    :+1: right, it did sound familiar but I didn't check.

  • Custom User Avatar

    That's basically what I meant "My solution works "on my machine", but fails when I submit it to CodeWars. Why?" to be, in particular the point about state being carried over between invocations of solution. I did not think of all scenarios apparently, and sure, we can add them there.

  • Custom User Avatar

    @hobovsky: we'll need to add a point about "my code doesn't output the same on cw and my local environment"

    -> global vars / language versions / mutation of the input / hidden memoization (python specific, with mutable default arguments) / ...?

  • Custom User Avatar

    I haven't solved it in Scala so it is possible there's some issue there, however, for such a basic test case, I kinda doubt it. Please read this point of the troubleshooting FAQ, especially bullet point no. 4, and see if it helps. I will check Scala version later today, but still I am pretty convinced the error is somewhere in your solution. If you find it, remember to mark the issue as resolved.

  • Loading more items...