Ad
  • Custom User Avatar

    It is bad practice to change the input or change a copy of the input.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Once again I tried some solutions and had no problem.

  • Custom User Avatar

    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 ""

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Please fixed tests or random tests? Which input do you have?