Anonymous user
Sorting algorithms/Counting sort: Difference between revisions
m
→Version 2
(→{{header|NetRexx}}: Add a more Rexx-like version) |
m (→Version 2) |
||
Line 1,022:
===Version 2===
A more Rexx-like (and shorter) version. Due to NetRexx's built in indexed string capability, negative values are also easily supported.
<lang NetRexx>/* NetRexx */
options replace format comments java crossref symbols nobinary
Line 1,045:
end
end ix
return ocounts.space
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
method getMinMax(icounts) public constant binary returns Rexx
amin =
amax =
loop x_ = 1 to icounts.words
end x_
Line 1,072 ⟶ 1,070:
say icounts.space
say countingSort(icounts)
return
|