Cody

Problem 44712. Sort Reversal

Solution 3547000

Submitted on 4 Nov 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   Fail
assert(isequal(SortReversal(1),0))

ans = 1

Assertion failed.

2   Fail
assert(isequal(SortReversal(3),1))

ans = 9

Assertion failed.

3   Fail
assert(isequal(SortReversal(71),1225))

ans = 5041

Assertion failed.

4   Fail
assert(isequal(SortReversal(113),3136))

ans = 12769

Assertion failed.

5   Fail
assert(isequal(SortReversal(123),3721))

ans = 15129

Assertion failed.

6   Fail
assert(isequal(SortReversal(199),9801))

ans = 39601

Assertion failed.

7   Fail
assert(isequal(SortReversal(257),16384))

ans = 66049

Assertion failed.

8   Fail
assert(isequal(SortReversal(321),25600))

ans = 103041

Assertion failed.

9   Fail
assert(isequal(SortReversal(333),27556))

ans = 110889

Assertion failed.

10   Fail
assert(isequal(SortReversal(503),63001))

ans = 253009

Assertion failed.

11   Fail
assert(isequal(SortReversal(555),76729))

ans = 308025

Assertion failed.

12   Fail
assert(isequal(SortReversal(737),135424))

ans = 543169

Assertion failed.

13   Fail
assert(isequal(SortReversal(777),150544))

ans = 603729

Assertion failed.

14   Fail
assert(isequal(SortReversal(999),249001))

ans = 998001

Assertion failed.

Suggested Problems

More from this Author18

Community Treasure Hunt

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

Start Hunting!