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.
This solution just blew my mind, there I was implementing a map, keeping the count of the numbers then checking the remainder etcetc. and I see this lol, chapeau!
This is not a code-golf. This kata was created to practice loops. The max chars requirement rejects solutions with the lyrics copy-paste.
IMO if this kata were code-golf would not be 7-kyu
This is a code-golf challenge. Proper formatting is not important.
Counting whitespace forces us to understand where they can be disposed of:
• you don't need a space between a number and a keyword like "5if")
• you don't need a space after brackets, quotes...
• you can put statements directly after the colon (Python)
• you can probably combine these two statements into one
...
So I think it should be kept like that.
However, I agree that different languages need different limits. To be at the same level as 300 chars in Python, I suggest:
• Ruby: 250
• Javascript: 350
• Haskell: 400
Don't know much about the other languages but C# and Go should definitely be much more.
Ranks can't be changed
It's not the author who gives the kyu but a moderator...
I am in agreement with astutus (as I posted in my suggestion about three weeks before).
It could be simple and just not count any white space.
The amount of white space found in strings is trivial compared to the amount used in proper formatting in some languages.
Ideally, white space inside of a string would count towards the 300 char limit, but it would not be a big loss (in C#) if it didn't.
I created this kata for Python and it was ranked as 7kyu. Maybe the translators for other languages should modify the char limit in some cases. But I can't chose that number because I am not fluent in those languages. It is up to them. You should contact them.
depending on syntax, sometimes whitespace can be eliminated from your code. but you simply can't NOT count any char, which
" "
is just as much as"H"
or"?"
must be counted