Cody

Solution 2029446

Submitted on 20 Nov 2019 by James Kelly
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)

vec = 1 4 2 9 3 8 5 7 10 6 vec = 9 5 1 6 4 8 10 2 3 7 vec = 5 4 3 1 7 9 6 8 10 2