Cody

Solution 121918

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