This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%% test 1
M=magic(5);
y_correct = [9, 24,1,8 ,15; 23 ,21,7,14,16; 4,6,13,20,22; 10,12,19,5,3; 11,18,25,2,17];
assert(isequal(flipDiagonal(M),y_correct))
|
2 | Pass |
%% test 2
m=magic(2);
y_correct=[2 3; 4 1];
assert(isequal(flipDiagonal(m),y_correct))
|
Project Euler: Problem 7, Nth prime
339 Solvers
"Low : High - Low : High - Turn around " -- Create a subindices vector
262 Solvers
307 Solvers
692 Solvers
Generate a vector like 1,2,2,3,3,3,4,4,4,4
1563 Solvers