Cody

Solution 2055800

Submitted on 12 Dec 2019 by Andrew Ramsay
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 = 3 2 1 6 10 8 4 5 7 9 vec = 7 1 5 4 10 8 3 9 6 2 vec = 4 2 1 9 10 5 8 7 6 3