Sorting algorithms/Counting sort: Difference between revisions

m
m (made the last sentence in the task's prologue to be a counterexample for the note.)
Line 1,947:
show(`a')</lang>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>countingSort[list_] := Module[{minElem, maxElem, count, z, number},
minElem = Min[list]; maxElem = Max[list];
Line 1,960:
];
]</lang>
 
<pre>countingSort@{2, 3, 1, 5, 7, 6}
->{1, 2, 3, 5, 6, 7}</pre>
1,111

edits