Cody

Solution 1896506

Submitted on 10 Aug 2019 by Yuumi Ozaki
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
x = [0,1,2,3,4]; y_correct = [4,3,2,1,0]; assert(isequal(desSort(x),y_correct))

r = 5 p = 0 p = 1 x = 0 0 2 3 4 x = 1 0 2 3 4 p = 2 x = 1 0 1 3 4 x = 2 0 1 3 4 p = 1 x = 2 0 0 3 4 x = 2 1 0 3 4 p = 3 x = 2 1 0 2 4 x = 3 1 0 2 4 p = 2 x = 3 1 0 1 4 x = 3 2 0 1 4 p = 1 x = 3 2 0 0 4 x = 3 2 1 0 4 p = 4 x = 3 2 1 0 3 x = 4 2 1 0 3 p = 3 x = 4 2 1 0 2 x = 4 3 1 0 2 p = 2 x = 4 3 1 0 1 x = 4 3 2 0 1 p = 1 x = 4 3 2 0 0 x = 4 3 2 1 0 y = 4 3 2 1 0

Suggested Problems

More from this Author1