Cody

Solution 2607733

Submitted on 24 Jun 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]))

Index exceeds the number of array elements (1). Error in look_and_say (line 7) repeat = (a == SEED(k+1)); Error in Test1 (line 1) assert(isequal(look_and_say([1]),[1 1]))

2   Pass
assert(isequal(look_and_say([1 1 1 1 1]),[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]))

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

Index exceeds the number of array elements (7). Error in look_and_say (line 7) repeat = (a == SEED(k+1)); 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]))