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.
That if expression shouldn't be necessary, the result of (reduce + []) would be 0 anyway.
No it does not. Cheating is earning points with a solution that is not yours or exploits of a language or of CW's system. In some katas one may hardcode all the solutions, unless the author limit the size of the code (which is stated in the description).
However I would not say it is a great idea, it's just I could not find an efficient approach to this problem :)
great idea to cache some calculations beforehand. Don't know if it counts as cheating tho.
The substring contains the prefix, and you have to sort them in ascending lexicographic order, what's what you think it's missing there?
But it nowhere states that it should be sorted by that prefix. It says to sort by count and character - nothing more.
So the issue remains and is still not solved.
It's already there and next time, mark your post as having spoiler content.
This comment is hidden because it contains spoiler information about the solution
Nice kata, enjoyed a lot.
The description about sorting could be clearer tho.
Please don't post solutions in Discourse.
This comment is hidden because it contains spoiler information about the solution
Can this solution be too memory intensive when calculating big intervals?
For anyone trying to solve it with bash that passed "Test" but failed with "Attempt", here's the hint:
bc is needed for large number calculations