Ad
  • Custom User Avatar

    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 more 3; we don't actually know that it is definitely not Kolakoski.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Random tests needed.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Original Sequence: [ 1, 1, 2, 2, 2, 1, 3, 3, 3, 3, 2]
    Run-length encoding: [ 2, 3, 1, 4, 1 ]

    But that's not how you RLE works.

    [(2, 1), (3, 2), (1, 1), (4, 3), (1, 2)] - this is RLE.

  • Custom User Avatar

    ( JS )

    In this Kata, you will be generating a Kolakoski sequence from a list of natural numbers.

    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.