Largest int from concatenated ints: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,962: | Line 1,962: | ||
<pre>998764543431 |
<pre>998764543431 |
||
6054854654</pre> |
6054854654</pre> |
||
=={{header|Red}}== |
|||
<lang Rebol>Red [] |
|||
foreach seq [[1 34 3 98 9 76 45 4] [54 546 548 60]] [ |
|||
print rejoin sort/compare seq function [a b] [ (rejoin [a b]) > rejoin [b a] ] |
|||
] |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
998764543431 |
|||
6054854654</pre> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
The algorithm used is based on exact comparisons (left to right) with ''right digit fill'' of the ''left digit''. |
The algorithm used is based on exact comparisons (left to right) with ''right digit fill'' of the ''left digit''. |