Cody

Solution 1807607

Submitted on 6 May 2019 by Michal Belorit
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 = 9 6 4 5 2 1 3 10 8 7 ans = 1 10 7 4 3 8 9 2 6 5 ans = 7 2 8 4 10 3 9 5 1 6

Suggested Problems

More from this Author52