Cody

Solution 2060754

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