Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Have you read the description? You need to add a space between each word, and your code doesn't do this. The only reason you have 1 failing test is because there are only 3 tests in total, otherwise you would fail many more of them.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    That arrays are zero-indexed, so, for an array of length 3, the valid indices are 0, 1 and 2.

  • Custom User Avatar

    Not a kata issue, you should replace the ... with something that makes the function able to take an arbitrary number of arguments. It's like that in every language.

  • Custom User Avatar

    Please mark your post as having spoiler content next time. Read the error message, you can see there that n can be greater than the length of the input array.

  • Custom User Avatar

    Yeah, there weren't any sample tests added to the Kata when it was originally authored in Ruby, Python, and JavaScript. That wasn't a requirement at the time, and it went through the beta process into release about 9 years ago.

    The Java translation was added after, by a different author, but must have also been before there was any requirement for sample tests.

    Note: There are tests, which should give explicit messages for what fails, and any sample tests would likely be testing the same things.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    DARK_Koder18713 (7 kyu) 2 months ago
    For me this is very simple kata( I like harder katas

    0 | Reply Spoiler Report

    lmao , fix it now . harder lol

  • Default User Avatar
  • Custom User Avatar

    Because your code is missing a } at the end. There is another problem with it, but that error is about that. Please drop the caps next time.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution