Cody

Solution 403366

Submitted on 13 Feb 2014 by Zikobrelli
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 8 4 2 3 5 7 6 9 1 ans = 8 9 7 10 4 1 2 5 3 6 ans = 3 5 7 1 10 8 4 6 2 9