Cody

Problem 43687. Change on Spiral Matrix

Solution 2092624

Submitted on 14 Jan 2020 by Asif Newaz
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
n = 5; y_correct = [25 24 23 22 21;10 9 8 7 20;11 2 1 6 19;12 3 4 5 18;13 14 15 16 17]; assert(isequal(your_fcn_name(n),y_correct))

a = 21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13 b = 13 14 15 16 17 12 3 4 5 18 11 2 1 6 19 10 9 8 7 20 25 24 23 22 21 y = 25 24 23 22 21 10 9 8 7 20 11 2 1 6 19 12 3 4 5 18 13 14 15 16 17

Suggested Problems