Cody

Solution 1982801

Submitted on 19 Oct 2019 at 15:23 by kranthi kumar
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 = 4 2 8 3 7 9 1 10 6 5 vec = 7 8 4 9 10 6 2 1 5 3 vec = 8 2 7 5 10 6 9 3 4 1