Ad
  • Custom User Avatar

    Original author here. I just want to clarify a few things:

    1. The kata is 8th Kyu because I only wrote it for Clojure and in Clojure this is one of the first things you learn. As a result people who completed the kata set the difficulty to 8th Kyu. Once this happens I can't change it from 8th Kyu.

    2. I didn't write any of the translations to other languages. I recognise that the concept doesn't translate well into all other languages, making it a much harder problem to solve (and sometimes harder to test as well). The ideal solution here would to allow kata to have different levels in different languages, but I don't see that happening.

    3. The point is to scan the sequence only up to a point. If your solution runs through everthing it should fail, because infinite sequences in Clojure exists. Other languages may allow those solutions, but that is not intended.

  • Custom User Avatar

    This doesn't guard against the case where i + g > n. Strange that there isn't a test case to cover it.

  • Custom User Avatar

    This test case in the Golang implementation violates the constraints provided in the instructions:

    dotest(10000, 9950, [][3]string{{"M: 9991", "B: 1427", "C: 1110"}})
    

    It should be dotest(9950, 10000, [][3]string{{"M: 9991", "B: 1427", "C: 1110"}}) or at the very least the indication should be removed that m <= n. Those hundreds of completions are people assuming that is the mistake or looking at the discussion to deduce the problem.

    I know this was marked resolved, but I believe erroneously so.

  • Custom User Avatar

    Sorry, I didn't write the JavaScript version of this Kata. But hopefully the author will respond.

  • Custom User Avatar

    I've mentioned this before, but I'll reiterate it here. This kata was initially for Clojure, where this functionality is foundational. As a result it was set ot 8 kyu (even though I initially set it to 6 kyu). As far as I know, there is no process to recategorize kata once they have been set.

  • Custom User Avatar

    The reason the kata is 8 kyu is because it was originally a Clojure kata and this is one of the simplest things you can do in Clojure. Subsequent ports are naturally harder in other languages, but the difficulty rating is common across languages. It may make sense now to reclassify it, but I don't think CodeWars lets you do that, unfortunately.

  • Custom User Avatar

    From the description:

    When the item isn't present or nothing follows it, the function should return nil in Clojure and Elixir, Nothing in Haskell, undefined in JavaScript.

  • Custom User Avatar

    I only wrote the original Clojure kata, which is why the description may seem a little vague.

    I don't think the ES6 appraoches are necessary, they are just popular since people have been learning ES6.

    It would have been nice if the author of the JS kata elaborated a little more, but I probably wouldn't do the best job of it, so I'll leave it as is for now.

  • Custom User Avatar

    Glad you managed it. I've just merged in a Javascript translation if you want to try that. :)

  • Custom User Avatar

    I think there's a way to rate them, or is that only while it's in Beta...

    I initially set it at 6th or 7th, but it came out as 8th Kyu.

    It could also be because it was initially Clojure only. Is the Haskell harder? Not sure.

  • Custom User Avatar

    I didn't write the Haskell, but I've fixed it.

  • Custom User Avatar

    Thanks. Fixed.

  • Custom User Avatar

    I'll see if I can work that in.