Cody

Solution 1823443

Submitted on 23 May 2019 by Keyur Panchal
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 = 2 5 10 9 6 8 4 3 7 1 vec = 3 6 7 2 1 9 10 8 5 4 vec = 6 5 8 1 2 3 9 4 10 7