Cody

Problem 594. "Look and say" sequence

Solution 2062093

Submitted on 18 Dec 2019
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]))

Error in solution: Line: 6 Column: 38 Invalid use of operator.

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

Error in solution: Line: 6 Column: 38 Invalid use of operator.

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

Error in solution: Line: 6 Column: 38 Invalid use of operator.

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

Error in solution: Line: 6 Column: 38 Invalid use of operator.

Suggested Problems

More from this Author3

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!