Sorting algorithms/Counting sort: Difference between revisions

Content deleted Content added
m →‎{{header|REXX}}: corrected a misspelling. -- ~~~~
Rdm (talk | contribs)
J: alternate implementation
Line 593:
cnt # min+i.#cnt
)</lang>
 
Alternative implementation:
 
<lang J>csort=: (+/@(=/) # ]) >./ (] + 1 i.@+ -) <./</lang>
 
And note that this can be simplified if the range is known in advance.
 
'''Example:'''
<lang j> ] a =. _3 + 20 ?@$ 10