Cody

Solution 107442

Submitted on 6 Jul 2012 by Luffy
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 = 9 3 5 8 7 2 10 1 4 6 ans = 7 1 5 2 4 8 10 3 6 9 ans = 3 1 7 5 4 10 6 8 9 2