Cody

Solution 1812231

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

Suggested Problems

More from this Author52