Cody

Solution 1041365

Submitted on 1 Nov 2016 by Stalin Samuel
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
v = [1 2]; y_correct = [1 1; 1 2]; assert(isequal(count_to_v(v),y_correct))

t = 1 y = 1 1 t = 2 y = 1 1 1 2 t = 3

2   Pass
v = [3 2]; y_correct = [1 1; 1 2; 2 1; 2 2; 3 1; 3 2]; assert(isequal(count_to_v(v),y_correct))

t = 1 y = 1 1 t = 2 y = 1 1 1 2 t = 3 y = 1 1 1 2 2 1 t = 4 y = 1 1 1 2 2 1 2 2 t = 5 y = 1 1 1 2 2 1 2 2 3 1 t = 6 y = 1 1 1 2 2 1 2 2 3 1 3 2 t = 7

Suggested Problems

More from this Author1