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.
It is bad practice to change the input or change a copy of the input.
I met exactly same issue as cazyw, then I figured out this was because I changed strarr using shift method, then I updated my solution without changing it all test passed, although this should be test case issue.
Once again I tried some solutions and had no problem.
I have the same problem as cazyw, solving in Ruby. In my code I added some debugging output:
strarr length is: 146
k is 44
✘ Expected: "", instead got: [verylongstring]
All of the other tests are passing, and it seems like this test should not be expecting ""
78 guys passed the kata in Ruby, I just tried and got no problem. I can't understand what happens with your case.
Are you sure that k = 64 and not
-64
? With k = 64 and your array of length 132 your answer is the good one:-)In the random tests (I printed k and strarr.length) the only cases with return "" are when k <= 0. Please keep me informed.
I forgot to ask: which language? Reread the description and see in which cases the result is "". The two cases you gave are almost the same, no? But in the first case your result is "" (I think k is
69
, not-69
) and in the second a very big string, that seems weird.Please fixed tests or random tests? Which input do you have?