Cody

Solution 1745304

Submitted on 7 Mar 2019 by Jason Casey
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 10 1 6 7 8 2 3 4 9 vec = 1 3 9 7 8 4 6 10 5 2 vec = 8 6 1 2 7 3 4 9 10 5