Cody

Solution 2012352

Submitted on 10 Nov 2019 at 14:44 by saeedeh ostovari
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 = 5 9 10 1 3 4 8 6 7 2 vec = 10 2 4 6 3 5 9 8 7 1 vec = 6 4 2 8 9 1 5 3 10 7