Problem 54260. Concatenate input positive integers to obtain a maximum.
Input some integers, you need to concatenate them to obtain a maximum integer. Neither use library function "perms" to list all possible solution, nor use to switch your data between numbers and strings. Therefore, any function, with substring "perm" or "str" is forbidden. Since possibly you get a super large number, return the string format of the answer.
E.g., input [2 4 41 27],
you get '441272';
and input [ 2 27 272 27272 ]
you get '27272722722'
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers33
Suggested Problems
-
Extract leading non-zero digit
2134 Solvers
-
1223 Solvers
-
1886 Solvers
-
Numbers with prime factors 2, 3 and 5.
475 Solvers
-
101 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!