Not very small, but a fun and different approach I think.
Nicely done!
Interesting one!
Nice use of recursion !!
Nice one, really wanna find the shortest answer
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
n = 5;
a = [1 0 1 0 1;
0 1 0 1 0;
1 0 1 0 1;
0 1 0 1 0;
1 0 1 0 1];
assert(isequal(a,checkerboard(n)))
|
2 | Fail |
n = 4;
a = [1 0 1 0;
0 1 0 1;
1 0 1 0;
0 1 0 1];
assert(isequal(a,checkerboard(n)))
|
3 | Fail |
n = 7;
a = [1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1];
assert(isequal(a,checkerboard(n)))
|
626 Solvers
Get the area codes from a list of phone numbers
532 Solvers
15302 Solvers
309 Solvers
390 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!