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.
Don't know why yours is downvoted -- it's helpful
This comment is hidden because it contains spoiler information about the solution
Genius!
Right, I generally struggle with 3kyu katas, but this one was quite easy ... the 1 line, 2 statement ruby solution is genius!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
They are not exactly the same. My sudoku solver passes the other kata, but this one for some reason does not pass :(
.
map
,indexOf
andincludes
are loop-alike methods, and they are nested there so yes.You're mutating s1 (changing the expected values), and even if you don't do it, your code will timeout. Find another way.
This comment is hidden because it contains spoiler information about the solution
I think random tests are broken in the Ruby version:
Random tests
Testing for qbvijarbjawewm and qarvjib
It should work with random inputs too - Expected: false, instead got: true
Testing for euyvotmmddjy and fqtieiowehtwxhuldjud
Test Passed: Value == false
Testing for pamfkfimuhxxmjku and afpm
It should work with random inputs too - Expected: false, instead got: true
qarvjib can be formed with with qbvijarbjawewm...
afpm can be formed with pamfkfimu...
Haskell translation
Yes, it should be 0. In python 3 it gives the correct result. With this observation you helped to discover a bug in Ruby and javascript version. I'll fix it in some minutes.
I think the reference solution somehow bugs on
[4,5]
.Loading more items...