Cody

Solution 255507

Submitted on 6 Jun 2013 by Suman Saha
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 = 5 9 10 8 4 1 3 7 2 6 ans = 10 2 5 6 4 8 7 3 1 9 ans = 3 8 9 6 10 1 2 7 5 4