Cody

Solution 2041049

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