Cody

# Problem 1024. Doubling elements in a vector

Solution 2227506

Submitted on 21 Apr 2020 by Brian Kelley
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))

L = 1 SS = 1 RR = 1 y = [] y = 1 SS = 2 y = 1 1 SS = 3 RR = 2 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))

L = 8 SS = 1 RR = 1 y = [] y = 0 SS = 2 y = 0 0 SS = 3 RR = 2 y = 0 0 -1 SS = 4 y = 0 0 -1 -1 SS = 5 RR = 3 y = 0 0 -1 -1 1 SS = 6 y = 0 0 -1 -1 1 1 SS = 7 RR = 4 y = 0 0 -1 -1 1 1 0 SS = 8 y = 0 0 -1 -1 1 1 0 0 SS = 9 RR = 5 y = 0 0 -1 -1 1 1 0 0 0 SS = 10 y = 0 0 -1 -1 1 1 0 0 0 0 SS = 11 RR = 6 y = 0 0 -1 -1 1 1 0 0 0 0 0 SS = 12 y = 0 0 -1 -1 1 1 0 0 0 0 0 0 SS = 13 RR = 7 y = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 SS = 14 y = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 SS = 15 RR = 8 y = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 SS = 16 y = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2 SS = 17 RR = 9 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2