Cody

Solution 291620

Submitted on 29 Jul 2013 by Jan Orwat
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 = 10; flagSame = isequal(makeRandomOrdering(n), makeRandomOrdering(n)); flagAllUsed = isequal([1:n],sort(makeRandomOrdering(n))); assert(~flagSame & flagAllUsed)

ans = 4 1 3 2 6 10 8 7 5 9 ans = 3 7 4 5 6 2 10 9 1 8 ans = 8 4 2 6 9 5 7 1 10 3