Sorting algorithms/Radix sort: Difference between revisions

Added Arturo implementation
m (→‎{{header|Phix}}: added syntax colouring the hard way)
(Added Arturo implementation)
Line 561:
Table sorted.
</pre>
=={{header|Arturo}}==
 
<lang rebol>
radixSort: function [items][
base: 10
a: new items
rounds: inc floor (ln max a)/ln base
loop rounds 'i [
buckets: array.of: 2*base []
baseI: base ^ i
loop a 'n [
digit: last digits n
if n >= 0 -> digit: digit + base
buckets\[digit]: buckets\[digit] ++ n
]
a: new flatten buckets
]
return a
]
 
print radixSort [3 1 2 8 5 7 9 4 6]</lang>
 
{{out}}
 
<pre>1 2 3 4 5 6 7 8 9</pre>
 
=={{header|AutoHotkey}}==
<lang AutoHotkey>Radix_Sort(data){
1,532

edits