Cody

Problem 89. Counting in Finnish

Solution 2259846

Submitted on 6 May 2020 by shaikh akbar shaikh rasul
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));

k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11

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

k = 2 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 11 k = 14

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

k = 2 k = 3 k = 4 k = 7 k = 8 k = 10 k = 11 k = 12

Suggested Problems

More from this Author95

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!