Cody

Solution 1696856

Submitted on 19 Dec 2018 by Martin C.
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
for k=1:20 x=randperm(k); assert(isequal(identity(x),x)); end assert(~isempty(strfind(fileread('identity.m'), 'diff')),'use diff')

z = [] z = 1 z = 2 -1 z = -1 -1 3 z = -2 1 2 1 z = 2 -1 -3 -1 2 z = -2 -3 4 -3 1 -3 z = 4 -3 5 -7 4 2 -3 z = 2 2 4 -1 -6 4 1 -3 z = 2 3 -6 -1 3 5 1 -4 1 z = -1 -1 -4 -2 4 1 5 -7 -2 8 z = -6 2 1 1 -5 -4 3 -2 5 -4 8 z = -2 -4 2 -3 -1 9 1 -7 8 -6 2 -8 z = -4 2 4 1 -10 4 8 -4 -6 4 -5 -2 12 z = 7 -5 -8 7 -5 8 -9 8 3 -8 -5 4 8 -6 z = -11 -1 2 11 -10 7 1 -5 -2 5 -10 15 -7 -2 3 z = -9 10 -4 8 -13 12 -10 9 -8 3 -2 3 3 -12 3 -4 z = -3 1 -2 15 -3 -6 -1 6 5 1 -3 -11 10 -5 -1 3 -1 z = 5 -6 10 -3 2 -14 13 -5 -4 12 -9 -8 3 1 6 8 -16 9 z = 7 -5 1 11 3 -12 14 -8 -1 -9 8 -3 2 8 -12 14 -6 1 2