Cody

# Problem 89. Counting in Finnish

Solution 2646971

Submitted on 3 Jul 2020
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));

b = 0 0 0 0 0 0 0 0 0 0 b = 8 0 0 0 0 0 0 0 0 0 b = 8 2 0 0 0 0 0 0 0 0 b = 8 2 3 0 0 0 0 0 0 0 b = 8 2 3 6 0 0 0 0 0 0 b = 8 2 3 6 4 0 0 0 0 0 b = 8 2 3 6 4 0 0 0 0 0 b = 8 2 3 6 4 0 7 0 0 0 b = 8 2 3 6 4 0 7 5 0 0 b = 8 2 3 6 4 0 7 5 9 0 b = 8 2 3 6 4 0 7 5 9 1 b = 8 2 3 6 4 0 7 5 9 1

2   Fail
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));

b = 0 0 0 0 0 0 0 0 0 0 0 0 0 b = 8 0 0 0 0 0 0 0 0 0 0 0 0 b = 8 8 0 0 0 0 0 0 0 0 0 0 0 b = 8 8 8 0 0 0 0 0 0 0 0 0 0 b = 8 8 8 2 0 0 0 0 0 0 0 0 0 b = 8 8 8 2 1 0 0 0 0 0 0 0 0 b = 8 8 8 2 1 6 0 0 0 0 0 0 0 b = 8 8 8 2 1 6 4 0 0 0 0 0 0 b = 8 8 8 2 1 6 4 3 0 0 0 0 0 b = 8 8 8 2 1 6 4 3 7 0 0 0 0 b = 8 8 8 2 1 6 4 3 7 2 0 0 0 b = 8 8 8 2 1 6 4 3 7 2 9 0 0 b = 8 8 8 2 1 6 4 3 7 2 9 5 0 b = 8 8 8 2 1 6 4 3 7 2 9 5 9 b = 8 8 8 2 1 6 4 3 7 2 9 5 9

Assertion failed.

3   Fail
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));

b = 0 0 0 0 0 0 0 0 0 0 0 b = 1 0 0 0 0 0 0 0 0 0 0 b = 1 1 0 0 0 0 0 0 0 0 0 b = 1 1 1 0 0 0 0 0 0 0 0 b = 1 1 1 8 0 0 0 0 0 0 0 b = 1 1 1 8 4 0 0 0 0 0 0 b = 1 1 1 8 4 6 0 0 0 0 0 b = 1 1 1 8 4 6 3 0 0 0 0 b = 1 1 1 8 4 6 3 2 0 0 0 b = 1 1 1 8 4 6 3 2 7 0 0 b = 1 1 1 8 4 6 3 2 7 4 0 b = 1 1 1 8 4 6 3 2 7 4 9 b = 1 1 1 8 4 6 3 2 7 4 9

Assertion failed.