Cody

Solution 1999854

Submitted on 2 Nov 2019 by Son Pham
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 = 4 2 7 8 9 6 1 5 10 3 vec = 3 4 10 1 6 9 2 8 5 7 vec = 9 10 7 2 4 8 6 5 1 3