Cody

Solution 2142347

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