Cody

Solution 2456851

Submitted on 2 Jun 2020 by BH
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 9 3 7 1 4 8 6 5 2 vec = 1 8 4 6 10 5 2 3 9 7 vec = 9 1 6 3 10 5 2 7 4 8