Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Original author here. I just want to clarify a few things:
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.
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.
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.
This doesn't guard against the case where
i + g > n
. Strange that there isn't a test case to cover it.This test case in the Golang implementation violates the constraints provided in the instructions:
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.
Sorry, I didn't write the JavaScript version of this Kata. But hopefully the author will respond.
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.
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.
From the description:
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.
Glad you managed it. I've just merged in a Javascript translation if you want to try that. :)
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.
I didn't write the Haskell, but I've fixed it.
Thanks. Fixed.
I'll see if I can work that in.