Cody

Solution 1903882

Submitted on 18 Aug 2019 by Philippe
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 2 10 5 8 9 4 7 1 3 ans = 6 9 1 10 8 2 4 5 3 7 ans = 5 4 9 2 7 10 1 6 8 3