Ad
  • Custom User Avatar

    Your code is poorly designed not a Kata.

  • Custom User Avatar

    But you do not pass all tests. You pass tests up to some point, but not all tests, because you run out of time.

  • Custom User Avatar

    @GrimLoch, based on your profile, you did not solve yet any purple (1 kyu or 2 kyu) kata, so your point (of "I've easily solved 2 kyu katas ") does not make too much sense. This is a difficult problem, I personally did not solve it yet, and you need an optimized algorithm. If your algorithm doesn't pass the tests in less that 12 seconds (not only one test, but all tests), it means it is not fast enough for this level and you may need to further optimize it or to come up with a better solution. But no, the fact that you can't solve the problem does not mean that the author of the kata is an amateur or that the kata is broken. Also, not solving a kata does not mean that you lose honor. It only means that you don't get additional honor.

  • Custom User Avatar

    What even is your point? You made no sense in your argument.

    You're saying that just because codewars limit test run to 12 second, meaning that the kata creators are amateurs because they create a kata that needs such complex algorithm in an environment with limited time?

    No, it's not being amateur. It's the opposite, creating a complex algorithm using math to create such fast-processing function for bigger inputs.

    If you're saying that the kata creator is amateur for doing that, what are you gonna call the coding olympiads winners (who deal with harder problems, on the spot, with bigger inputs and more strict time limit)? A doodoo head?

    Also, you say that you pass it on the sample test cases? Haha, well everybody could. Just hard-code 'em. It'll pass the sample cases since it has fixed tests, right?

    That's why the attempt one has random tests. To ensure it solved the requirements. The attempt one is not stupid. This kata is not for you if you don't want to solve it in the hard way.

    You might wanna do the easier version of this kata instead, in which your algorithm should be able to pass.

  • Custom User Avatar

    Disagree all you want, this doesn't change the fact it's your own fault.

    Also, you said you easily solved 2 kyu katas, meanwhile there's not even a single completed 2 kyu kata in your profile.

    I guess you just want the question to be able to be solved using simple algorithm. Welp, it is not 2 kyu if it's not hard / challenging, buddy.

  • Custom User Avatar

    What language are you using to solve the kata?

    If you're using JS, I just looked at your solution. Your solution is not efficient enough for this kata.

    It took around 5 minutes to solve a randomized RGB string with 100k length.

    Meanwhile the solution in the test case did it in 13ms.

    It is not the kata's fault.

  • Custom User Avatar

    Yeah it doesn't work like that :P

  • Custom User Avatar

    Perhaps your algorithm is not fast enough?