Cody

# Problem 574. Sort numbers by outside digits

Solution 1720046

Submitted on 3 Feb 2019 by Nikolaos Nikolaou
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 = [12368933, 12345931, 68221, 533111, 3819999999999]; y_correct = [12345931, 12368933, 3819999999999, 533111, 68221]; assert(isequal(your_fcn_name(x),y_correct))

y = 12345931 y = 12345931 12368933 y = 1.0e+12 * 0.0000 0.0000 3.8200 y = 1.0e+12 * 0.0000 0.0000 3.8200 0.0000 y = 1.0e+12 * 0.0000 0.0000 3.8200 0.0000 0.0000

2   Pass
x = [4591023, 37410101, 97516, 888123, 15061789]; y_correct = [15061789, 37410101, 4591023, 888123, 97516]; assert(isequal(your_fcn_name(x),y_correct))

y = 15061789 y = 15061789 37410101 y = 15061789 37410101 4591023 y = 15061789 37410101 4591023 888123 y = 15061789 37410101 4591023 888123 97516

3   Pass
x = [1110098, 1110197, 1110296, 1110395, 1110494, 1110593, 1110691]; y_correct = fliplr(x); assert(isequal(your_fcn_name(x),y_correct))

y = 1110691 y = 1110691 1110593 y = 1110691 1110593 1110494 y = 1110691 1110593 1110494 1110395 y = 1110691 1110593 1110494 1110395 1110296 y = 1110691 1110593 1110494 1110395 1110296 1110197 y = 1110691 1110593 1110494 1110395 1110296 1110197 1110098

4   Pass
x = [324651, 65432114, 1032464, 21465476, 1232165746561, 12321]; y_correct = [1032464, 12321, 1232165746561, 21465476, 324651, 65432114]; assert(isequal(your_fcn_name(x),y_correct))

y = 1032464 y = 1032464 12321 y = 1.0e+12 * 0.0000 0.0000 1.2322 y = 1.0e+12 * 0.0000 0.0000 1.2322 0.0000 y = 1.0e+12 * 0.0000 0.0000 1.2322 0.0000 0.0000 y = 1.0e+12 * 0.0000 0.0000 1.2322 0.0000 0.0000 0.0001