Cody

Solution 2144360

Submitted on 28 Feb 2020 by Henry Wu
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 1 5 3 4 6 9 10 7 2 vec = 6 9 10 4 1 7 3 5 8 2 vec = 3 2 9 6 10 7 5 1 8 4