Cody

Solution 2020073

Submitted on 14 Nov 2019 at 8:14 by Steven Butler
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 = 8 2 1 7 6 9 10 5 3 4 vec = 4 3 10 8 5 7 2 1 9 6 vec = 1 8 4 7 9 3 6 5 10 2