Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Your solution fails on this test:
in_array(["foo bar", "foo", "bar"], ["foo", "bar"])
Sorry.
This solution allows duplicates in the answer and thus is wrong.
Python translation
This comment is hidden because it contains spoiler information about the solution
i am a noob and i don't get it. can somebody help explain?
Needs random tests
Needs random tests
Needs random tests
Needs random tests
i forgot about it
thanks
Needs random tests.
I don't think you understand how Sudoku rules work.
Besides every row and column, every sub-block must also have distinct numbers.
I solved the task but 2 tests failed, because my program found another solution
can someone take a look?
Expected: [[4, 1, 2, 3], [2, 3, 4, 1], [3, 4, 1, 2], [1, 2, 3, 4]], instead got: [[1, 2, 3, 4], [2, 3, 4, 1], [3, 4, 1, 2], [4, 1, 2, 3]]
Expected: [[4, 2, 3, 1], [3, 1, 2, 4], [1, 3, 4, 2], [2, 4, 1, 3]], instead got: [[3, 2, 4, 1], [2, 1, 3, 4], [1, 4, 2, 3], [4, 3, 1, 2]]
as you can see both solutions are correct
this is the smartest solution i've ever seen lol
It's about 1200 lines, the original solution was only 170 and i'm pretty sure i could cut that down. Originally i had a line in that plugged the code back into itself with some of the cells fixed, it would then do this until there weren't any 0s left. It worked fine in sudoku solver #4 but for some reason in this it was breaking out early and giving me lots of the values still undecided. After a day of trying (and failing) to fix it I just copied and pasted the bits that worked :p
Loading more items...