Ad
  • Custom User Avatar

    Print the input, see what's wrong with your code.

  • Default User Avatar

    also: don't forget to always use the spoiler tag when discussing code. (I have added the tag for you)

  • Default User Avatar

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

  • Custom User Avatar

    sort of, yes. Because in that case, the fact that you didn't find it yet just means one thing: you didn't actually take the time to read the different bits of information already available to you.

    Keep in mind that on codewars, you can print the inputs or whatever you want to the console, from within your function (console.log, in JS edit: System.out.println rather, since you seem to be doing Java). That might help too.

    cheers

  • Custom User Avatar

    Hi,

    1. spoiler flag, please, when you post code
    2. you'll quickly discover that 99,99% of the time, on published kata with thousands of solutions already, when someone "thinks that my code is correct but..." that someone did something wrong somewhere. And you did...
    3. read the info you have, for your problem: the name of the failed tests is a strong indication already. And you surely got an error message or maybe a traceback about an error -> read it. If you wanna learn programming, you have to be able to extract usefull information on your own, from this kind of stuff.

    Everything you need is already available to you to solve your problem. Just dig into it.

    cheers