Cody

Solution 1854372

Submitted on 20 Jun 2019 by Vadim Smirnov
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 = 4 10 7 9 1 3 5 6 2 8 vec = 2 6 5 1 8 9 10 3 4 7 vec = 9 7 10 8 2 4 6 1 3 5