Cody

Solution 1709848

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