Cody

Solution 1740783

Submitted on 2 Mar 2019 by Gasper Umbreht
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 = 5 1 6 10 8 2 3 7 9 4 vec = 4 7 2 9 6 3 1 10 5 8 vec = 3 1 10 9 6 5 4 2 8 7