Cody

Solution 338968

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