Cody

Solution 1864057

Submitted on 3 Jul 2019 by Dominik Glettler
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 = 2 9 4 8 1 7 10 3 6 5 vec = 4 5 2 1 8 7 3 9 6 10 vec = 3 2 10 6 5 8 1 7 4 9