Cody

Solution 335585

Submitted on 18 Oct 2013 by Greg
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 1 9 10 5 2 4 8 3 6 ans = 1 2 9 4 10 5 6 8 7 3 ans = 6 1 5 10 8 9 4 2 3 7