Cody

Solution 2014836

Submitted on 12 Nov 2019 at 0:04 by Juan Oxmar Ramirez
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)

ans = 1 9 2 7 4 6 8 5 3 10 ans = 6 3 9 1 10 2 4 8 7 5 ans = 1 3 7 10 2 4 5 9 6 8