Cody

Solution 1818422

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