Sorting algorithms/Counting sort: Difference between revisions

m
→‎Icon and Unicon: header simplification
m (→‎Icon and Unicon: header simplification)
Line 426:
l countingSortInPlace println # ==> list(-4, 1, 2, 3, 5)</lang>
 
== {{header|Icon}} and {{header|Unicon }}==
==={{header|Icon}}===
The following example is hopefully in the spirit of a counting sort using a hash table as a substituted for a sparse array. Simply translating the pseudo-code would be very un-Iconish (as opposed to Uniconish).
 
Line 459 ⟶ 458:
on list : [ 3 14 1 5 9 2 6 3 ]
with op = &null: [ 1 2 3 3 5 6 9 14 ] (0 ms)</pre>
 
==={{header|Unicon}}===
The Icon solution works in Unicon.
 
=={{header|J}}==
Anonymous user