Cody

Solution 554373

Submitted on 9 Jan 2015 by Jean-Marie Sainthillier
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 x = randperm(n); y_correct = [2 4 6 8 10]; assert(isequal(rmv_srt(n),y_correct))

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

2   Pass
%% n=25 x = randperm(n); y_correct = [2 4 6 8 10 12 14 16 18 20 22 24]; assert(isequal(rmv_srt(n),y_correct))

n = 25 ans = Columns 1 through 16 5 14 9 19 21 15 17 3 10 23 22 4 25 18 7 6 Columns 17 through 25 11 20 12 8 1 24 16 2 13 ans = 2 4 6 8 10 12 14 16 18 20 22 24