Cody

Solution 1944655

Submitted on 21 Sep 2019 by Nguyen Huu Hung
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 = 6 5 1 2 9 8 7 3 4 10 vec = 4 8 9 3 7 1 6 2 5 10 vec = 1 7 6 3 10 2 9 5 8 4