Cody

Solution 15110

Submitted on 30 Jan 2012 by elias GR
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, log in.

Test Suite

Test Status Code Input and Output
1   Pass
%% 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)))

{Warning: Size vector should be a row vector with integer elements.} {> In repmat at 90 In checkerboard at 2 In verifyCode>evaluateCode at 159 In verifyCode at 37 In fevalJSON at 14} {Warning: Size vector should be a row vector with integer elements.} {> In repmat at 91 In checkerboard at 2 In verifyCode>evaluateCode at 159 In verifyCode at 37 In fevalJSON at 14} a = 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 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

2   Pass
%% n = 4; a = [1 0 1 0; 0 1 0 1; 1 0 1 0; 0 1 0 1]; assert(isequal(a,checkerboard(n)))