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.
Unpublishing as a duplicate.
Duplicate of other run-length encoding kata, like for example this one: https://www.codewars.com/kata/546dba39fa8da224e8000467
This comment is hidden because it contains spoiler information about the solution
Since enough people found it satisfying, and, comparing it to other similar katas, there's enough differences and merit to approve this, I did approve it at 5kyu. The fact it's well tested was the decisive factor :P
That's my first approval, if you think it's a bad decision, let me know and I won't do it in the future ;-)
Various cases added.
Example was added.
This comment is hidden because it contains spoiler information about the solution
Maybe add a note about repeating characters means they have to be next to each other. Or add an example in the instructions where there are two separate groups of the same number.
Yes, it's a duplicate.
Exact encoding of input or output is not the issue, "Is the concept behind this kata novel?" is. And it is not.
I did Escape the maze just yesterday, and it's essentially identical. Not word for word, but conceptually, both in task and solution. And there's quite a lot of them.
However, as long as people are voting
Satisfied
, I'd rather have a thousand well-implemented, well-tested "Escape the maze" kata than a thousand "Fibonacci" ones with bad descriptions, bad tests, no example tests,O(n!)
reference implementations and no author support in the comments.If
i
is global, you can onlyconst
it once ..I still see no reason ( or way ) to read the description differently than "alternating, starting with
>
( per instance )".( and it's been solved for
===
as well )Done before as in, there are already a million katas about "implicit coercion due to the use of comparison operators that are not
===
". Back when thea==1 && a==2 && a==3
question become viral (and a big, hot rep bait) on StackOverflow there were 4 beta katas published on CW on exactly that. And they all got retired.That's not the point, the point is whether the parameter
i
is 'global' or not.Um, nope.
Description specifies alternating comparisons, always starting with
>
.Loading more items...