Cody

Solution 936012

Submitted on 13 Aug 2016 by Martin C.
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
x = 1; y_correct = [1 1]; assert(isequal(your_fcn_name(x),y_correct))

B = 0 p = 1 B = 1 B = 1 1 p = 3

2   Pass
x = [0 -1 1 0 0 0 1 2]; y_correct = [0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2]; assert(isequal(your_fcn_name(x),y_correct))

B = 0 0 0 0 0 0 0 0 p = 1 B = 0 0 0 0 0 0 0 0 B = 0 0 0 0 0 0 0 0 p = 3 B = 0 0 -1 0 0 0 0 0 B = 0 0 -1 -1 0 0 0 0 p = 5 B = 0 0 -1 -1 1 0 0 0 B = 0 0 -1 -1 1 1 0 0 p = 7 B = 0 0 -1 -1 1 1 0 0 B = 0 0 -1 -1 1 1 0 0 p = 9 B = 0 0 -1 -1 1 1 0 0 0 B = 0 0 -1 -1 1 1 0 0 0 0 p = 11 B = 0 0 -1 -1 1 1 0 0 0 0 0 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 p = 13 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 p = 15 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2 p = 17