Cody

Solution 1201053

Submitted on 30 May 2017 by Said BOUREZG
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 = 6 5 2 9 8 10 3 1 4 7 ans = 8 5 4 10 3 9 6 7 1 2 ans = 7 3 8 6 5 9 2 4 1 10