Cody

# Problem 89. Counting in Finnish

Solution 187134

Submitted on 7 Jan 2013 by Vialla
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
%% a = [1 2 3 4 5 6 7 8 9 0]; b = [8 2 3 6 4 0 7 5 9 1]; out = finnishOrdering(a); assert(isequal(out, b));

l = Columns 1 through 8 1 10000 -10000 -1000 -1 100 -100 10 Columns 9 through 11 -100000 1000 -10 t = Columns 1 through 8 -100000 -10000 -1000 -100 -1 1 10 100 Columns 9 through 10 1000 10000 b = 8 2 3 6 4 10 7 5 9 1 ans = 8 2 3 6 4 0 7 5 9 1

2   Pass
%% a = [1 1 1 2 0 4 5 3 7 2 9 8 9]; b = [8 2 2 3 4 0 7 5 9 9 1 1 1]; out = finnishOrdering(a); assert(isequal(out, b));

l = Columns 1 through 8 1 10000 -10000 -1000 -1 100 -100 10 Columns 9 through 11 -100000 1000 -10 t = Columns 1 through 8 -100000 -10000 -10000 -1000 -1 1 10 100 Columns 9 through 13 1000 1000 10000 10000 10000 b = 12 4 10 8 6 5 9 7 11 13 1 2 3 ans = 8 2 2 3 4 0 7 5 9 9 1 1 1

3   Pass
%% a = [0 0 0 1 5 4 3 2 7 5 9]; b = [2 3 4 0 0 0 7 5 5 9 1]; out = finnishOrdering(a); assert(isequal(out, b));

l = Columns 1 through 8 1 10000 -10000 -1000 -1 100 -100 10 Columns 9 through 11 -100000 1000 -10 t = Columns 1 through 8 -10000 -1000 -1 1 1 1 10 100 Columns 9 through 11 100 1000 10000 b = 8 7 6 1 2 3 9 5 10 11 4 ans = 2 3 4 0 0 0 7 5 5 9 1