Cody

Solution 219039

Submitted on 19 Mar 2013 by andrea84
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 = 7 6 3 10 8 5 4 1 2 9 ans = 10 2 4 5 9 1 6 3 7 8 ans = 1 9 6 10 4 2 8 5 3 7