Jump to content

Largest int from concatenated ints: Difference between revisions

(Added Delphi reference to Pascal code)
(→‎{{header|Quackery}}: second method)
Line 1,906:
 
=={{header|Quackery}}==
 
'''With a string of space separated sequences of digits:'''
 
<lang quackery>[ sortwith
[ 2dup swap join
Line 1,918 ⟶ 1,921:
6054854654
</pre>
 
'''With a nest of numbers:'''
 
<lang quackery> [ number$ dip number$ join $->n drop ] is conc ( n n --> n )
 
[ 2dup conc unrot swap conc < ] is conc> ( n n --> b )
 
[ sortwith conc>
$ "" swap
witheach [ number$ join ]
$->n drop ] is task ( [ --> n )
 
' [ [ 1 34 3 98 9 76 45 4 ]
[ 54 546 548 60 ] ]
 
witheach [ task echo cr ] </lang>
 
{{out}}
 
<pre>998764543431
6054854654</pre>
 
=={{header|Racket}}==
1,462

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.