Cody

Solution 1715392

Submitted on 25 Jan 2019 by James Best
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(look_and_say([1]),[1 1]))

NEXT = 1 1

2   Pass
assert(isequal(look_and_say([1 1 1 1 1]),[5 1]))

NEXT = 5 1

3   Pass
assert(isequal(look_and_say([1 3 3 1 5 2 2]),[1 1 2 3 1 1 1 5 2 2]))

p = 0 1 p = 1 1 p = 1 1 2 p = 1 1 2 p = 1 1 2 1 p = 1 1 2 1 p = 1 1 2 1 1 p = 1 1 2 1 1 p = 1 1 2 1 1 1 p = 1 1 2 1 1 1 p = 1 1 2 1 1 1 2 p = 1 1 2 1 1 1 2 exc = 1 3 1 5 2 2 exc = 1 3 1 5 2 p = 1 2 1 1 1 2 p = 1 2 1 1 2

4   Pass
assert(isequal(look_and_say([8 6 7 5 3 0 9]),[1 8 1 6 1 7 1 5 1 3 1 0 1 9]))