Cody

Solution 459526

Submitted on 20 Jun 2014 by rifat
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 1 2 6 3 4 7 9 8 ans = 10 3 2 7 6 5 8 9 4 1 ans = 6 5 10 2 1 3 9 7 8 4