Cody

Problem 45321. Kolakoski Sequence

This is a modified version of the kolakoski sequence.

Refer to the problem https://www.mathworks.com/matlabcentral/cody/problems/2371 for the original one.

for this case,

Given a particular initial vector a and length x, generate the kolakoski sequence (first x terms) from that vector.

For example if a=[2,1] and x=10 ; the sequence would look like --

 2     2     1     1     2     1     2     2     1     2     2

Solution Stats

40.0% Correct | 60.0% Incorrect
Last Solution submitted on May 13, 2020

Problem Comments

Problem Recent Solvers5

Suggested Problems

More from this Author145

Problem Tags