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.
Haskell translation
( Haskell )
Random tests are predictable: expected value is always the one where
abs(x) <= 14
.Lua translation!
In Lua,
expected
andactual
are swapped.assert.are.same(solution.count(a), k89(a))
should beassert.are.same(k89(a), solution.count(a))
.The description specifies upper limit as
10E8
which is most probably a typo (should be1E8
or1E9
), and different translations interpret this differently. The ambiguity has to be resolved, notation has to be fixed, and translations which got it wrong have to be corrected.Go Translation
Go Translation ;)
Go Translation ;)
Go translation
Just solved in Go.
My solutions was assuming the array of indices was sorted based on the examples and it woked for all the solutions.
I was also asuming the array contains no negative indices.
But, reading the description, the assumptions were just not correct.
About the first assumption, I suggest to either ...
About the second assumption, I suggest to either ...
Failed random tests in Haskell do not show actual input string:
I've made a fork that fixes this.
This comment is hidden because it contains spoiler information about the solution
Haskell fork
Rust translation
pytohn new test frameworks
Loading more items...