Cody

# Problem 594. "Look and say" sequence

Solution 100027

Submitted on 19 Jun 2012 by Aurelien Queffurust
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]))

count = 1 out = [] out = 1 1

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

count = 5 out = [] out = 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]))

count = 1 2 1 1 2 out = [] out = 1 1 out = 1 1 2 3 out = 1 1 2 3 1 1 out = 1 1 2 3 1 1 1 5 out = 1 1 2 3 1 1 1 5 2 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]))

count = 1 1 1 1 1 1 1 out = [] out = 1 8 out = 1 8 1 6 out = 1 8 1 6 1 7 out = 1 8 1 6 1 7 1 5 out = 1 8 1 6 1 7 1 5 1 3 out = Columns 1 through 10 1 8 1 6 1 7 1 5 1 3 Columns 11 through 12 1 0 out = Columns 1 through 10 1 8 1 6 1 7 1 5 1 3 Columns 11 through 14 1 0 1 9