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.
What should
possiblyKolakoski([1,3,3])
return, and why? It might still be Kolakoski so far if it were to be extended starting with exactly one more3
; we don't actually know that it is definitely not Kolakoski.generateKolakoski
must generate a sequence that may not be a Kolakoski sequence. This could be explained better; the naming suggests that either the input will always generate a valid sequence ( this is not specified though, and it is not true either ) or we maybe have to throw an error or something ( we don't ), instead we are supposed to blithely return a Non-Kolakoski sequence.Working on JavaScript and Haskell versions, and it might just be me but I stumble over that.
Random tests needed.
May I recommend Kata Ranking for your attention? The estimated
3
kyu rank seems optimistic.In the end, it doesn't really matter - solvers will arrive at some estimate by themselves - but don't be disappointed if it's not quite a
3
.But that's not how you RLE works.
[(2, 1), (3, 2), (1, 1), (4, 3), (1, 2)]
- this is RLE.( JS )
Ehm, no you won't; you'll be doing the default CodeWars kata
twoOldestAges
.I guess you inadvertently clicked on JavaScript somewhere and created an empty translation, and it's really a C++-kata. Please delete JS ( or, even better, fix it! then I could solve it ).
Two things that had me wondering from the description: what would we do with ( hypothetical ) starting list
[1,2,1]
- same first and last element ? And how do we get from[1,3,1,2]
to[1,3,3]
in the example? While you're at it, please explain those things better.