Cody

Solution 1904053

Submitted on 18 Aug 2019 by Noah Klausner
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));

c = 10 2 0 0 0 0 0 0 0 0 c = 10 2 3 0 0 0 0 0 0 0 c = 10 2 3 5 8 4 7 0 0 0 c = 10 2 3 5 8 4 7 1 9 0

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

c = 10 10 10 2 0 0 0 0 0 0 0 0 0 c = 10 10 10 2 6 5 8 3 0 0 0 0 0 c = 10 10 10 2 6 5 8 3 7 0 0 0 0 c = 10 10 10 2 6 5 8 3 7 2 0 0 0 c = 10 10 10 2 6 5 8 3 7 2 9 0 0 c = 10 10 10 2 6 5 8 3 7 2 9 1 9

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

c = 6 6 6 10 8 5 3 0 0 0 0 c = 6 6 6 10 8 5 3 2 0 0 0 c = 6 6 6 10 8 5 3 2 7 0 0 c = 6 6 6 10 8 5 3 2 7 8 9

Suggested Problems

More from this Author95