Cody

Solution 112525

Submitted on 14 Jul 2012 by Vitaly Lavrukhin
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)

ans = 2 6 3 9 7 5 10 4 8 1 ans = 9 3 7 10 2 4 5 8 6 1 ans = 4 8 5 6 10 9 7 2 3 1

Suggested Problems

More from this Author52