Cody

Solution 292181

Submitted on 30 Jul 2013 by Rahul Shinde
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 = 8 2 3 1 6 10 9 5 4 7 ans = 3 9 5 4 6 10 7 8 1 2 ans = 3 2 8 10 6 4 7 1 9 5