Cody

Solution 1927612

Submitted on 9 Sep 2019 by Nikolaos Nikolaou
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 3 6 9 11]; y_correct = [1 3 6 9 11; 11 1 3 6 9; 9 11 1 3 6; 6 9 11 1 3; 3 6 9 11 1]; assert(isequal(circShiftMe(x),y_correct))

x = 11 1 3 6 9 y = 11 1 3 6 9 x = 9 11 1 3 6 y = 11 1 3 6 9 9 11 1 3 6 x = 6 9 11 1 3 y = 11 1 3 6 9 9 11 1 3 6 6 9 11 1 3 x = 3 6 9 11 1 y = 11 1 3 6 9 9 11 1 3 6 6 9 11 1 3 3 6 9 11 1 x = 1 3 6 9 11 y = 11 1 3 6 9 9 11 1 3 6 6 9 11 1 3 3 6 9 11 1 1 3 6 9 11 y = 1 3 6 9 11 11 1 3 6 9 9 11 1 3 6 6 9 11 1 3 3 6 9 11 1 1 3 6 9 11 y = 1 3 6 9 11 11 1 3 6 9 9 11 1 3 6 6 9 11 1 3 3 6 9 11 1

2   Pass
x = [1 2 3 4 5]; y_correct = [1 2 3 4 5; 5 1 2 3 4; 4 5 1 2 3; 3 4 5 1 2; 2 3 4 5 1]; assert(isequal(circShiftMe(x),y_correct))

x = 5 1 2 3 4 y = 5 1 2 3 4 x = 4 5 1 2 3 y = 5 1 2 3 4 4 5 1 2 3 x = 3 4 5 1 2 y = 5 1 2 3 4 4 5 1 2 3 3 4 5 1 2 x = 2 3 4 5 1 y = 5 1 2 3 4 4 5 1 2 3 3 4 5 1 2 2 3 4 5 1 x = 1 2 3 4 5 y = 5 1 2 3 4 4 5 1 2 3 3 4 5 1 2 2 3 4 5 1 1 2 3 4 5 y = 1 2 3 4 5 5 1 2 3 4 4 5 1 2 3 3 4 5 1 2 2 3 4 5 1 1 2 3 4 5 y = 1 2 3 4 5 5 1 2 3 4 4 5 1 2 3 3 4 5 1 2 2 3 4 5 1

3   Pass
x = [6 7 8]; y_correct = [6 7 8; 8 6 7; 7 8 6]; assert(isequal(circShiftMe(x),y_correct))

x = 8 6 7 y = 8 6 7 x = 7 8 6 y = 8 6 7 7 8 6 x = 6 7 8 y = 8 6 7 7 8 6 6 7 8 y = 6 7 8 8 6 7 7 8 6 6 7 8 y = 6 7 8 8 6 7 7 8 6