Cody

Solution 351989

Submitted on 15 Nov 2013 by priyanka shrivastava
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 = 4 1 9 2 10 7 8 6 3 5 ans = 4 9 8 5 3 2 6 7 1 10 ans = 1 5 9 6 7 8 10 4 2 3