Cody

Solution 1952025

Submitted on 28 Sep 2019 by Le Manh Long Le Manh Long
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 = 7 9 5 6 8 3 4 2 1 10 vec = 3 8 6 5 7 9 2 4 1 10 vec = 5 8 4 3 9 10 7 2 6 1