Cody

Solution 2142072

Submitted on 27 Feb 2020 by karthik raj
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))

n = 1 arr = [] arr = 1 1 B = 1 1

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

n = 8 arr = [] arr = 0 0 arr = 0 0 -1 -1 arr = 0 0 -1 -1 1 1 arr = 0 0 -1 -1 1 1 0 0 arr = 0 0 -1 -1 1 1 0 0 0 0 arr = 0 0 -1 -1 1 1 0 0 0 0 0 0 arr = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 arr = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2