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.
Hi, you should simply use round instead of ceil
This comment is hidden because it contains spoiler information about the solution
ruby tests seems to be broken.
the approved solution doesn't work for now
Thank you for the detailed explaination
You're mutating the array, that's why the tests fail.
This comment is hidden because it contains spoiler information about the solution
Paste your code, mark it as having spoiler content.
I'm sure that I have to return 'p' answer from ["o", "q", "r", "s", "t", "u"]. But tests want me to return 'P' as I can see.
Random tests
Testing for ["b", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r"]
It should work for random inputs too - Expected: "C", instead got: "c"
Testing for ["g", "h", "i", "j", "k", "l", "m", "o", "p", "q", "r"]
It should work for random inputs too - Expected: "N", instead got: "n"
Testing for ["e", "f", "g", "h", "i", "j", "k", "l", "m", "o"]
It should work for random inputs too - Expected: "N", instead got: "n"
Testing for ["r", "s", "u", "v"]
It should work for random inputs too - Expected: "T", instead got: "t"
Testing for ["I", "J", "K", "L", "M", "N", "O", "Q"]
Testing for ["f", "h", "i", "j"]
It should work for random inputs too - Expected: "G", instead got: "g"
Testing for ["A", "B", "C", "D", "E", "F", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U"]
Testing for ["R", "S", "T", "V", "W", "X"]
Testing for ["j", "k", "m", "n", "o", "p", "q", "r", "s"]
It should work for random inputs too - Expected: "L", instead got: "l"
Testing for ["m", "n", "o", "p", "r", "s", "t", "u", "v", "w", "x"]
It should work for random inputs too - Expected: "Q", instead got: "q"
Testing for ["D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X"]
Testing for ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p"]
It should work for random inputs too - Expected: "O", instead got: "o"
Testing for ["j", "l", "m"]
It should work for random inputs too - Expected: "K", instead got: "k"
Testing for ["p", "q", "r", "s", "t", "v", "w", "x"]
It should work for random inputs too - Expected: "U", instead got: "u"
Testing for ["K", "L", "M", "N", "O", "P", "Q", "R", "T", "U", "V", "W", "X"]
Testing for ["H", "J", "K", "L", "M", "N", "O"]
Testing for ["L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "W"]
Testing for ["E", "F", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W"]
Testing for ["U", "V", "X", "Y"]
Testing for ["I", "J", "L", "M", "N"]
Testing for ["J", "K", "L", "M", "N", "O", "P", "R", "S", "T", "U", "V", "W"]
Testing for ["j", "k", "l", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y"]
It should work for random inputs too - Expected: "M", instead got: "m"
Testing for ["u", "v", "w", "y"]
It should work for random inputs too - Expected: "X", instead got: "x"
Testing for ["R", "T", "U", "V", "W"]
Testing for ["t", "v"]
It should work for random inputs too - Expected: "U", instead got: "u"
Testing for ["U", "W"]
Testing for ["E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X"]
Testing for ["F", "H"]
Testing for ["h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "w"]
It should work for random inputs too - Expected: "V", instead got: "v"
Testing for ["g", "i", "j", "k", "l", "m"]
It should work for random inputs too - Expected: "H", instead got: "h"
Testing for ["M", "N", "P", "Q", "R"]
Testing for ["t", "u", "w", "x", "y", "z"]
It should work for random inputs too - Expected: "V", instead got: "v"
Testing for ["s", "t", "u", "v", "x", "y", "z"]
It should work for random inputs too - Expected: "W", instead got: "w"
Testing for ["T", "U", "W"]
Testing for ["n", "o", "q", "r", "s", "t", "u"]
It should work for random inputs too - Expected: "P", instead got: "p"
Testing for ["j", "k", "l", "n", "o", "p", "q"]
It should work for random inputs too - Expected: "M", instead got: "m"
Testing for ["Q", "R", "S", "U"]
Testing for ["D", "E", "F", "G", "H", "I", "J", "K", "L", "N", "O", "P", "Q", "R", "S", "T", "U"]
Testing for ["h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "u", "v", "w"]
It should work for random inputs too - Expected: "T", instead got: "t"
Testing for ["k", "l", "m", "n", "o", "p", "r", "s", "t", "u", "v", "w"]
It should work for random inputs too - Expected: "Q", instead got: "q"
I've tested Ruby version and it works as expected. Are you sure you're not mutating the array somehow?
in examples I see
['a','b','c','d','f'] -> 'e'
['O','Q','R','S'] -> 'P'
but I'm getting: Expected: "P" from ["o", "q", "r", "s", "t", "u"]=low-case array
Case sensitivity!
I understood my problem: the algorithm wasn't optimal.
For now it works.
Process was terminated. It took longer than 12000ms to complete
what's wrong?
it takes 2 ms for basic tests to run
could anyone help me please?
Can I get some kind of debug info?
Testing for ["k", "l", "m", "n", "p", "q", "r", "s"]
It should work for random inputs too - Expected: "O", instead got: "o"
what I've done wrong?
please explain this:
Random tests
Testing for ["o", "q", "r", "s", "t", "u"]
It should work for random inputs too - Expected: "P", instead got: "p"
why should it return 'P' instead of 'p' ?