Cody

Solution 2427859

Submitted on 30 May 2020 by Victoria Chang
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 = 10 5 3 2 7 1 6 9 4 8 vec = 10 7 9 5 3 2 1 6 8 4 vec = 7 4 9 5 3 6 8 10 1 2