Cody

Solution 1849735

Submitted on 15 Jun 2019 by Mahmoud Gasser
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)

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

Suggested Problems