Cody

# Problem 594. "Look and say" sequence

Solution 2393589

Submitted on 27 May 2020
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   Fail
assert(isequal(look_and_say([1]),[1 1]))

Unrecognized function or variable 'sequence'. Error in look_and_say (line 6) NEXT = [sequence sum(B==b(k))]; Error in Test1 (line 1) assert(isequal(look_and_say([1]),[1 1]))

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

Unrecognized function or variable 'sequence'. Error in look_and_say (line 6) NEXT = [sequence sum(B==b(k))]; Error in Test2 (line 1) assert(isequal(look_and_say([1 1 1 1 1]),[5 1]))

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

Unrecognized function or variable 'sequence'. Error in look_and_say (line 6) NEXT = [sequence sum(B==b(k))]; Error in Test3 (line 1) assert(isequal(look_and_say([1 3 3 1 5 2 2]),[1 1 2 3 1 1 1 5 2 2]))

4   Fail
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]))

Unrecognized function or variable 'sequence'. Error in look_and_say (line 6) NEXT = [sequence sum(B==b(k))]; Error in Test4 (line 1) 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]))