Ad
  • Custom User Avatar

    There are already several issues posted below about this.
    Which language?

  • Custom User Avatar

    State the language, when you raise issues. Here it seems to be java.

    About your problem, not an issue, you just didn't understand correctly the task:

    longest consecutive repetition

    closing, cheers.

  • Custom User Avatar

    So at level 7, you are suppose to do perfect code ...

    You are not supposed to do perfect code at any level, because perfect code is not possible to get, at any level :)

    What you are supposed to get though is a good idea. If your code is ugly as hell, but backed by a good idea, then it will definitely pass :)

    That's quite often the case with timeout errors in Codewars kata: if you get one, simply take a step back, look at the problem from some other perspective, leave it for a day, stop thinking about the code, and try to find some better idea. Sometimes this idea is easy to get, and sometimes requires some more research, googling, or reading, but code itself is usually not very complicated.

    It's that easy! ;)

  • Custom User Avatar

    What do you mean by 'being capable'?
    When would you call someone 'capable' of doing something?

  • Custom User Avatar

    The person approved the kata without passing the test ? How is it possible ? it make no sense.

    He meant: His algo no longer passes now.

    Obviously testcases were later updated to kick out those linear solutions.

  • Default User Avatar

    Your solution should have O(n) time complexity

  • Default User Avatar

    the person who approved it approved it at 7, but his algo didn't pass tests now. It's just that a lot of solutions aren't efficient at all and still pass.

  • Default User Avatar

    with performance is 6.

  • Custom User Avatar
    Test.assertSimilar(hello(), 'Hello, World!', "returns 'Hello, World!' when name is not given")
    

    That's the test your code fails, there's no argument there, and your code assumes name is a string.

  • Custom User Avatar

    Closing because it's not a kata issue. Read the error message.

  • Default User Avatar

    Not an issue of the kata. If you mark your code with markdown formatting ofc, we can look at it for you. However, also resolve the issue then.

    Edit: 2000+ people completed it in javascript so it is correct.