Cody

Solution 2111650

Submitted on 30 Jan 2020 by John Reynolds
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 = 5 7 3 9 6 8 4 10 2 1 ans = 6 1 10 9 5 7 2 8 4 3 ans = 4 1 3 8 5 10 9 7 6 2