Cody

Solution 1847865

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